rytc / enet-jai

Native Jai port of the ENet Reliable UDP networking library
MIT License
10 stars 2 forks source link

Fix peer_reset so it does not clear the peer address and connect_id #7

Closed okmatija closed 10 months ago

okmatija commented 10 months ago

These are useful for the disconnect event.

Also improve example.jai:

okmatija commented 10 months ago

The diff is clearest in split view without whitespace changes (I fiddled with some alignment/indentation). Unfortunately I don't see a hide whitespace option on github, sorry!

okmatija commented 10 months ago

BTW, I confirmed that the C version (https://github.com/zpl-c/enet) preserves the address and connect_id data in the enet_peer_reset call, and I made a test client/server to access that data on disconnect

rytc commented 10 months ago

Looks good, thanks for this