[ENet-discuss] Differentiating multiple peer clients fromsameremote machines

Ruud van Gaal ruud at racer.nl
Wed May 20 02:22:31 PDT 2009


A quick find on sessionID shows it uses enet_rand() to generate it.
That means it's not really useful for array indexing (the outgoingPeerID is;
even though I search for the ID rather than indexing, it still is easier to
follow when you're debugging), and not really guaranteed to be unique
(although it often is, so you might get near-impossible-to-trace problems).

Ruud

> -----Oorspronkelijk bericht-----
> Van: enet-discuss-bounces at cubik.org 
> [mailto:enet-discuss-bounces at cubik.org] Namens Daniel Aquino
> Verzonden: Wednesday, May 20, 2009 00:20
> Aan: Discussion of the ENet library
> Onderwerp: Re: [ENet-discuss] Differentiating multiple peer 
> clients fromsameremote machines
> 
> Can't you just use the peer.sessionID ?
> 
> On Tue, May 19, 2009 at 5:19 AM, Ruud van Gaal <ruud at racer.nl> wrote:
...
> >> So, how do I properly identify the individual peers running on the 
> >> remote systems when I get an ENET_EVENT_TYPE_CONNECT, and 
> use the The 
> >> host is bound to ENET_HOST_ANY, at UDP port #4079.
> >
> > I use the following to uniquely identify client ID's in my QNClient 
> > abstraction class:
...
> >        id=event.peer->outgoingPeerID;



More information about the ENet-discuss mailing list