Very clear. :) Since hosts do not necessarily have to use the public
service, I'll leave
open the option to bind to an IP.
Once again thank you for your answers, much appreciated!
Martin
Quoting Lee Salzman <[email protected]>:
The significance is that passing in an address causes the UDP socket to
bind to a specific address. If you don't bind at least a port, you are
both getting an ephemeral port assigned the socket, and you are getting
whatever IP the OS decided to assign to the socket. Now, if you are
having your servers connect to said public service to tell what their
IP/port is, this really doesn't matter all that much. Though, many
people like to be able to explicitly assign ports/IPs to their game
servers - especially when they have multiple IPs on their host.
Lee
M. Rijks wrote:
Thank you for your reactions, both. I should learn and catch the
subtle hints in the documentation. :)
My intention is to make the 'server' connect to a public service
(running Enet) which passes the server's public IP and port around
to clients querying the same service for sessions.
What made it slightly confusing for me is that for a client a NULL
address is specified when creating a host, while for the server one
specifies an IP (well, often just ENET_HOST_ANY) and a port. So
apparently you can leave those NULL as well?
_______________________________________________
ENet-discuss mailing list
[email protected]
http://lists.cubik.org/mailman/listinfo/enet-discuss
_______________________________________________
ENet-discuss mailing list
[email protected]
http://lists.cubik.org/mailman/listinfo/enet-discuss