OK, so I've reworked the patch and it doesn't break anything so do people
want to see it or shall I just commit?

Basically we now cache the APR_ values and you can set the
TCP_CORK/TCP_NOPUSH via the apr_setsocketopt call.  apr_getsocketopt works
fully as well (using the cached values...)

david

----- Original Message -----
From: "Greg Stein" <[EMAIL PROTECTED]>
To: "APR Development List" <dev@apr.apache.org>
Sent: Tuesday, January 09, 2001 2:48 AM
Subject: Re: [PATCH] track socket options...


> On Mon, Jan 08, 2001 at 10:30:32PM -0000, David Reid wrote:
> > Folks,
> >
> > This is a small patch that's very much a starting point.  Basically
> > following Deans suggestion we should be tracking what options we have
set on
> > a socket and using the cached information to avoid system calls.  I've
used
> > an int and the system defined values as that way we can use the mask for
non
> > APR values, i.e. things like TCP_CORK.  By caching the values we also
get a
> > working apr_getsocketopt which is useful.
>
> >From <asm/socket.h> on my Linux box:
>
> #define SO_DEBUG    1
>
> >From <netinet/tcp.h>:
>
> #define      TCP_NODELAY   0x01
>
>
> In other words... you have a collision.
>
> Told ya to use the APR values :-)
>
> (for things like TCP_CORK, just have an internal flag; or possibly go
ahead
> and place it into apr_network_io.h; I mean why not?!)
>
> (oh... and if you create internal flags: leave a comment in
apr_network_io.h
> about where the other flags are to prevent confusion / collision)
>
> The patch seems to go in the right direction. The big thing will be
whether
> APR has some internal uses of setsockopt that will need to tweak the
flags.
> (or just recode the internal one to use apr_setsockopt)
>
> Cheers,
> -g
>
> --
> Greg Stein, http://www.lyra.org/
>

Reply via email to