httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <man...@io.com>
Subject Re: local/remote address in conn_rec
Date Fri, 22 Oct 1999 22:14:55 GMT
On Fri, Oct 22, 1999 at 01:41:14PM -0700, Dean Gaudet wrote:
> On Wed, 20 Oct 1999, Brian Havard wrote:
> >   The question is, should we still be using sockaddr_in structures
> >   with APR?  I would think no, which would mean the conn_rec's
> > 
> >     struct sockaddr_in local_addr;	/* local address */
> >     struct sockaddr_in remote_addr;	/* remote address */
> > 
> > will need to change, but to what? Perhaps two ap_socket_t *'s ? That would
> > allow things like ap_getipaddr() & ap_get_remote_hostname() to be used on
> > them.

AFAICT, the APR Way(tm) would be to get these structures through the
socket itself. The path to the socket would be kind of a mouthful,
though.

((ap_apr_socket_iol *) conn->client->iol)->socket

> the berkeley socket API has very few warts, few that apache ever
> encounters.  you should be striving to implement it in a portable way, not
> invent a new API.

+1

-- 
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/

Mime
View raw message