in reply to Bidirectional Socket, Blocking
You cannot send to a socket whilst the same end that you are trying to send to is in a receive state. Even if the receive is being done on a dup() of the socket in a fork or thread.
Most of the time, that isn't a problem because comms protocols tend to be a conversation where one end speaks and the other replies. If you need to be able to initiate sends from both ends, then your reads will need to be non-blocking.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bidirectional Socket, Blocking
by DanielPHuber (Initiate) on Oct 16, 2012 at 13:33 UTC | |
by BrowserUk (Patriarch) on Oct 16, 2012 at 13:49 UTC | |
by DanielPHuber (Initiate) on Oct 16, 2012 at 17:13 UTC |