httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <man...@io.com>
Subject Re: non-blocking accept in APR?
Date Wed, 26 Apr 2000 16:47:28 GMT
On Wed, Apr 26, 2000 at 08:16:16AM -0400, rbb@covalent.net wrote:
> On Tue, 25 Apr 2000, Manoj Kasichainula wrote:
> 
> > Is there any hope of non-blocking accept in APR?
> 
> Yeah, code them, and there's always hope.  :-)  Is there hope if you don't
> write the code?  It's a lot less likely.  :-)

The reason I ask at all if there is hope is that I don't know if
the other operating systems support this at all. It'd be pretty easy
to add to the Unix side if I know that it will be legal on the others.

> > As an aside, in the current dexter code, we're making a wasteful
> > getsockname() call because of the transitions between APR and OS
> > sockets. A BSD-like socket API would be cleaner, IMO, and also avoid
> > this extra overhead.
> 
> A BSD-like socket API would be cleaner, now if you can figure out how to
> port that to Windows and still keep the performance improvements we are
> getting with the current API, I'd love to see it.  :-)

OK, what parts of the code should I look at to see these performance
enhancements? As a quick scan, I looked at the ap_bind() call in all
for OSes, and it used the underlying BSD socket API. I see no
potential performance loss so far.

Hmmm, interesting; ap_accept is actually simpler, faster code on
Windows than on Unix. For example, it doesn't call getsockname() all
the time. But, it still uses the BSD socket API.

If you're talking about potential performance loss because of a future
switch of the WIndows code or something, then I'd need to actually see
the WinSock API to have a clue here.

Mime
View raw message