On Wed, 14 Jul 2010, Alexander Lamaison wrote:

If you _know_ the sockets should be silent (ie there's no TCP traffic on them) you can select() to see if they've become readable, and if they are in spite of you knowing they shouldn't be, reading 0 bytes from them indicates they're disconnected.

Do I need to actually do the read?

Not necessarily no. If you are sure they should be idle, you can skip the reading.

What would a >0 return value indicate?

That data came over the connection anyway!

Presumably that I'd gotten my logic wrong and the socket wasn't meant to be silent

Exactly!

--

 / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to