[ENet-discuss] Question about enet_host_connect/enet_peer_disconnect data
Martin Man
mman at martinman.net
Mon Mar 18 18:53:13 UTC 2024
Hi Lee, others…
I have noticed something undocumented that I am wondering about…
When you enet_host_connect to another peer and pass in the data parameter of X… that constant X gets passed to the remote event ENET_EVENT_TYPE_CONNECT as expected. However on the local host where the connect originated, the ENET_EVENT_TYPE_CONNECT receives 0.
Similarly, when you enet_peer_disconnect with custom data value X, that value X gets transmitted to the remote side and propagated up via ENET_EVENT_TYPE_DISCONNECT, but originating host receives the event with 0.
I am just wondering what is the thinking behind this feature. I have gotten the feeling that the same X passed to _connect and _disconnect should be propagated on both sides…
Could you please help me understand this?
thanks,
Martin
More information about the ENet-discuss
mailing list