Jump to content
  • Advertisement
Sign in to follow this  
lonesock

ENet update

This topic is 4736 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, everybody. I just wanted to mention 2 updates to ENet that happened recently: 1) somehow the packet auto-fragmentation code had gotten wedged (only an issue if you were sending large packets), but is fixed now. 2) you can now broadcast packets (to send data if you wish, but mostly I'm going to use it for automatic server discovery on a LAN). Look for ENET_HOST_BROADCAST in enet.h. You'd use it something like this:
//	start my server on my address, and on this port
client = enet_host_create (NULL /* create a client host */,
    1 /* only allow 1 outgoing connection */,
    0,0 /* no bandwidth capping for us, this is a speed test */);

address.host = ENET_HOST_BROADCAST;
address.port = 7747;
peer = enet_host_connect (client, &address, 2);

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!