You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ilya gordon <gr...@iggroup.org> on 2004/07/06 21:32:54 UTC
[users@httpd] Re: Apache 2.0 Buffered I/O API question
Nick Kew <nick <at> webthing.com> writes:
>
> On Fri, 2 Jul 2004, ilya gordon wrote:
>
> > These set of functions is completely missing from the new Apache 2.0 API.
> > Does anybody know what they are replaced with.
>
> Not unless you tell us what you need that isn't provided for by the
> ap_rwrite() and/or ap_fwrite() family of buffered IO functions.
>
This is what I have right now in a module for ver 1.3 that I am trying to
convert to 2.0 API
buffer = ap_bcreate( r->pool, B_RDWR );
ap_bpushfd( buffer, socket, socket );
>From what I understand this creates a i/o buffer in the pool with READ and
WRITE permissions. Then with ap_bpushfd it connects the buffer to the
read/write streams of the socket.
To print to the socket I do something like
ap_bprintf( buffer, "Hello %s!\r\n", name);
Since ap_bcreate() is missing from 2.0 API, how would I convert this properly
to the new 2.0 API.
Thanks
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Apache 2.0 Buffered I/O API question
Posted by ilya gordon <gr...@iggroup.org>.
i have looked at apr_network_io.h.
i don't see anything that offers the same ability as the
ap_bcrete() or ap_pushfd() did.
Does this mean i have to write to the socket using apr_socket_send()?
this is much less convinient then the old way.
do you know any other alternatives?
Thanks
--
ilya
Nick Kew said:
> On Tue, 6 Jul 2004, ilya gordon wrote:
>
>> This is what I have right now in a module for ver 1.3 that I am trying
>> to
>> convert to 2.0 API
>>
>> buffer = ap_bcreate( r->pool, B_RDWR );
>> ap_bpushfd( buffer, socket, socket );
>
> Oh, you mean IPC unconnected with the request/response?
>
> That's now APR, not HTTPD. Look at apr_network_io.h.
>
> --
> Nick Kew
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Apache 2.0 Buffered I/O API question
Posted by Nick Kew <ni...@webthing.com>.
On Tue, 6 Jul 2004, ilya gordon wrote:
> This is what I have right now in a module for ver 1.3 that I am trying to
> convert to 2.0 API
>
> buffer = ap_bcreate( r->pool, B_RDWR );
> ap_bpushfd( buffer, socket, socket );
Oh, you mean IPC unconnected with the request/response?
That's now APR, not HTTPD. Look at apr_network_io.h.
--
Nick Kew
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org