apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject Re: [PATCH] APR Socket IOL
Date Fri, 09 Nov 2001 13:39:03 GMT
> > On Thursday 08 November 2001 01:34 pm, Bill Stoddard wrote:
> > >
> > > What you are suggesting will not work at all. There are apr_socket(and
> > > related) calls in places other than the core_*_filters. And it is not safe
> > > to make these calls (which will call BSD socket network io system calls)
> > > using descriptors from a different network interface.
> >
> > Then I would consider the filtering logic broken.  If you can't replace the
> > underlying network types, then we need to move all of the network calls in
> > the core into new hooks, that can be bypassed if a different network mechanism
> > is required.
> This really sounds to me like you mean to -replace- the apr/network_io/unix
> directory with the appropriate calls for the API.

I only need to use alternate implementations of apr_socket_*() in some cases. And I need
to be able to select which network interface to use at runtime, not compile time.

> I can't picture mixing one socket provider with another in a given build of
> the apr.  Wouldn't this cause all sorts of problems if a module author called
> a given apr function to create a 'conflicting' socket?

I need to use two different socket providers simultaniously. For example, my kernel cache
which requires the alternate socket API does not support SSL. httpd would use this
alternate socket API to listen on port 80. httpd SSL would use standard socket APIs to
listen on port 443.

And you comment about conflicting sockets is dead on as to why I need the IOL abstraction.
Precisly to prevent httpd from calling the standard socket API using a descriptor from my
own API.  With the socket iol, a third party module can just use apr_socket* calls w/o
worrying about how they are implemented under the covers. It just works.

I am really doubtful that filters are the solution here but I am trying to understand :-)


View raw message