in reply to select appears to ignore pending data on socket.
I don't think that you have a choice about using non-blocking sockets. If you are receiving variable-length data, I can't recall a way to look at how much is in the socket buffer before reading. You can either read a char at a time, and keep checking via select (not very pretty), or switch to non-blocking.
You mention having switched to non-blocking mode. Did you do this using sysread/recv? Could we see the code that did not work in this instance?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: select appears to ignore pending data on socket. (var-len)
by tye (Sage) on Nov 05, 2007 at 14:38 UTC | |
|
Re^2: select appears to ignore pending data on socket.
by Zidane (Acolyte) on Nov 07, 2007 at 17:51 UTC |