[Libevent-users] sockets descriptor access
Dave Gotwisner
dgotwisner at rosum.com
Wed Mar 12 20:13:22 EDT 2008
Ycrux wrote:
> Hi Niels,
>
>> I guess I do not quite understand what you are trying to accomplish.
>> In most cases, you will get a different fd for each connection.
>> Perhaps, you could explain the reason for hashing on something? Why
>> don't you hash on the remote IP?
>>
>
> We can have the case that multiple clients use the same IP address.
> Hashing this IP will produce the same digest.
>
> Following your suggestion, is there any recommended way (i.e. via a
> getter method) to access the "fd" descriptor?
You can use IP and Port (source or dest, I don't remember which). One
of the port numbers is 80, the other is unique for the IP address.
More information about the Libevent-users
mailing list