apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject Re: [PATCH] APR Socket IOL
Date Thu, 08 Nov 2001 19:38:52 GMT
On Thursday 08 November 2001 07:32 am, Bill Stoddard wrote:
> This patch is a first rough implementation of a socket iol in APR (from
> discussions with Sander Striker a few months back).
>
> Public API Changes:
> No new APIs were created.
> apr_socket_create() has an extra parameter, a pointer to an
> apr_socket_iol_t.
>
> New Public Structures:
> apr_socket_iol_t - contains pointers to callback functions.
>
> Usage:
> If you do not want to redirect socket calls and just use existing APR
> calls, use apr_socket_create() thusly:
> apr_socket_create(&new_sock, APR_INET, SOCKSTREAM, NULL, r->pool);
>
>
> If you want to redirect socket calls:
>
> /* Set up apr_socket_iol_t with pointers to specific calls you
>  * want to redirect
>  */
> apr_socket_iol_t *iol;
> iol = apr_pcalloc(r->pool, sizeof(*iol));
> iol->iol_socket_shutdown = pointer_to_your_shutdown_function;
> iol->iol_socket_read = pointer_to_your_read_function;
> iol->iol_socket_write = pointer_to_your_write_function;
> ...
> ...
> apr_socket_create(&new_sock, APR_INET, SOCKSTREAM, iol, r->pool);
>
> Comments:
> This patch implements a single cross platform entry point for all the
> apr_socket_* calls (see network_io/unix/aprsocketapi.c). Most of the code
> in this patch is accounting for this.
>
> I have tested this on Windows. I started modifying code in the Unix branch
> but it is surely is broken.Haven't made any effort on the other network_io
> OS specific branches.
>
> Comments?

What is this supposed to be used for?  I'm still not sure that this is necessary.

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Mime
View raw message