On Wed, 23 Oct 2002, Cliff Woolley wrote: > On Wed, 23 Oct 2002, Damir Dezeljin wrote: > > > I'm looking how to convert an UNIX socket to APR socket (apr_socket_t). > > Can anyone help me please? Is there also any way to convert stdin/stdout > > to apr_socket_t (I'm trying to use APR to write a simple daemon example, > > one for inetd, so I need stdin/stdout, and the other one more general). > > Also is there any way to convert file descriptor (int and/or FILE *) to > > APR file descriptors? > > Well, for int fd's, you can use apr_os_file_put(), or apr_os_pipe_put() if > it's a pipe [see apr_portable.h]. > > I'm not aware of any currently-existing equivalent for sockets, but we > might be able to add one.
The same thing exists for sockets. Just look in apr_portable.h. The general rule, is that all APR types have a way to convert from the native version to the APR version. Ryan _______________________________________________________________________________ Ryan Bloom [EMAIL PROTECTED] 550 Jean St Oakland CA 94610 -------------------------------------------------------------------------------