httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: UDP support in APR/network_io
Date Mon, 27 Mar 2000 17:42:12 GMT

> > > For instance, it is not possible to "poll" or "do a select"
> > > on pipes and sockets in 1 time. Why, because they use different
> > > apr-types (ap_file_t and ap_socket_t).
> > 
> > This was a concious decision, because some platforms don't support this
> > operation.
> I can understand the concious decision part, but I believe 
> that somehow similar functionality should be provided by APR.
> So if I have a process that needs to wait on OR IPC-input or UDP-input
> (in my case) I cannot do this in APR?? I believe APR should.
> If some platforms don't support this. It would require additional
> code and it should be done under an APR function.
> On most unixes it would be easy on the others not, but then it
> needs more coding.

On some platforms, it isn't a question of more code, it is literally
impossible to do this.  Regardless, one of the things I keep meaning to
add is an ap_fake_socket routine.  This would basically take anything that
isn't a socket on Unix, and make it look like a socket for the sake of
ap_poll.  On any non-unix platform, it would return APR_ENOTIMPL.

> > 
> > This isn't true.  The way to do this, is not call Unix Domain Sockets part
> > of the network_I/O section.  Unix Domain Sockets are used for IPC, as are
> > pipes on Windows.  The solution is to create a new APR type, apr_ipc_t,
> > which uses the correct mechanism on each platform.
> But then the "poll" or "select" needs to accept 2 different types.

Use the same solution I outlined above.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message