[ENet-discuss] enet_peer_reset() change

Lee Salzman lsalzman1 at cox.net
Mon Sep 6 06:02:17 PDT 2004


I could easily make enet_peer_reset() not overwrite the address field, I
think. However, just as a stop-gap: enet_host_connect() does in fact
return the peer that has been allocated for the connection, so you
should be able to set the data field right then and there.

Lee

On Tue, Aug 31, 2004 at 03:21:36AM -0600, John Philip wrote:
> When I am sent an ENET_EVENT_TYPE_DISCONNECT event, ENet has already 
> called enet_peer_reset() on that peer, which zeroes everything, including the
> address structure. This makes it difficult to determine just WHO disconnected
> from me. I could work around this by storing the address in peer.data, unless
> the disconnect event is caused by a that host I tried to contact to but never
> answered. In that case I don't have a chance to set peer.data.
> 
> What about changing enet_peer_reset() so it doesn't zero the address? Or
> is there some other solution to this problem?
> 
> Thanks,
> John


More information about the ENet-discuss mailing list