On 10/06/2009 10:52 AM, Joe Orton wrote:
> The naming is not good here. A TCP socket is "connected" after the > connection is successfully established via connect(), up until it is > destroyed. From the name, I would expect this function to do would be > to say whether a non-blocking connect() has completed. > > This function will reliably tell you that the receive part of the socket > has been shut down by the peer, in the case that the socket's read > buffer is empty. Notably the socket may still be "connected" in that > state, albeit in half-duplex mode. > > I'd suggest a name like: > > apr_socket_atreadeof > apr_socket_at_read_eof > > or something similar? The API docs should reflect that the return value > is 1-on-success/zero-on-failure (unusual for APR), and that the function > does not block. Apart from the other discussion items (return value / name) I improved the documentation in r822431 http://svn.apache.org/viewvc?rev=822431&view=rev Regards RĂ¼diger
