apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: apr_send() -> how to flush to network?
Date Sun, 08 Apr 2001 00:03:36 GMT
Graham Leggett <minfrin@sharp.fm> writes:

> To send the "HTTP/1.1 200 Connection Established" the code uses
> apr_send() -> but this data is never flushed, so it never sees the
> network (a sniff shows nothing over the wire). As a result the
> connections hangs there and the browser never responds.

A couple of points...

. apr_send() hands the data straight to the TCP/IP stack; it does not
  buffer data, so there is no need for apr_socket_flush()

. if your APR socket has a timeout set or is non-blocking, apr_send()
  can write fewer bytes than you requested... check the output
  bytes-written status

If no bytes are going to the wire, what is happening in the TCP layer?
Can you use netstat to display info about the TCP connection?  Maybe
there are already bytes in the send buffer and the TCP stack can't
accept any more because the other side isn't acknowledging bytes
already sent?

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Mime
View raw message