On 27 Jun 1999 [EMAIL PROTECTED] wrote:
> Index: ap_listen.h > =================================================================== > RCS file: /home/cvs/apache-2.0/mpm/src/include/ap_listen.h,v > retrieving revision 1.1 > retrieving revision 1.2 > diff -u -d -u -r1.1 -r1.2 > --- ap_listen.h 1999/06/25 01:25:05 1.1 > +++ ap_listen.h 1999/06/27 03:45:13 1.2 > @@ -64,6 +64,7 @@ > struct sockaddr_in local_addr; /* local IP address and port */ > /* TODO: replace the fd with APR stuff */ > int fd; > + int index; /* index into pollfd array */ > /* more stuff here, like which protocol is bound to the port */ > }; Actually I would rather you allocate your own structures in your MPM for this index ... or maybe someone can figure out a better Listen abstraction. Your "index" field is related to how your MPM accepts incoming connections, and not all MPMs will do it that way. For your use of poll() I'm not sure why you need the index actually... don't you just need to set up an array of pollfds, and all the info you need is in struct pollfd ? The fd is there... At some point when we add protocol/transport layer abstraction you'll need to know what protocol/transport is bound to the socket. But then you could just allocate two arrays with common indicies. Dean