[Libevent-users] sockets descriptor access

2008-03-10 Thread Lyes Amazouz
Hello everybody I want to know if there is a mean to access the socket descriptor associated with the evhttp_connection object (the field fd i guess), because I want to use it as a key for a hash function. instead of this, can the server specify, for each client, an independent user environment ei

Re: [Libevent-users] sockets descriptor access

2008-03-11 Thread Niels Provos
On Mon, Mar 10, 2008 at 6:24 AM, Lyes Amazouz <[EMAIL PROTECTED]> wrote: > I want to know if there is a mean to access the socket descriptor associated > with the evhttp_connection object (the field fd i guess), because I want to > use it as a key for a hash function. > instead of this, can the se

Re: [Libevent-users] sockets descriptor access

2008-03-11 Thread Adrian Chadd
On Tue, Mar 11, 2008, Niels Provos wrote: > On Mon, Mar 10, 2008 at 6:24 AM, Lyes Amazouz <[EMAIL PROTECTED]> wrote: > > I want to know if there is a mean to access the socket descriptor associated > > with the evhttp_connection object (the field fd i guess), because I want to > > use it as a key f

Re: [Libevent-users] sockets descriptor access

2008-03-12 Thread Ycrux
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

Re: [Libevent-users] sockets descriptor access

2008-03-12 Thread Dave Gotwisner
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 multip

Re: [Libevent-users] sockets descriptor access

2008-03-12 Thread Niels Provos
On Wed, Mar 12, 2008 at 2:40 PM, Ycrux <[EMAIL PROTECTED]> wrote: > We can have the case that multiple clients use the same IP address. > Hashing this IP will produce the same digest. The way that this is done usually with HTTP is to set a session cookie on the client. The client then echos th

Re: [Libevent-users] sockets descriptor access

2008-03-12 Thread Robert Iakobashvili
Hi Neils and Ycrux, On Thu, Mar 13, 2008 at 6:44 AM, Niels Provos <[EMAIL PROTECTED]> wrote: > On Wed, Mar 12, 2008 at 2:40 PM, Ycrux <[EMAIL PROTECTED]> wrote: > > We can have the case that multiple clients use the same IP address. > > Hashing this IP will produce the same digest. > > The way

Re: Re: [Libevent-users] sockets descriptor access

2008-03-13 Thread ycrux
port" will do the job. cheers Y. Message d'origine >Date: Thu, 13 Mar 2008 07:49:31 +0200 >De: "Robert Iakobashvili" >A: "Niels Provos" >Sujet: Re: [Libevent-users] sockets descriptor access >Copie à: Ycrux, "Lyes A