[En-Nut-Discussion] Interrupting NutTcpSend/Receive from other thread

Harald Kipp harald.kipp at egnite.de
Fri Feb 13 15:14:17 CET 2004


At 22:43 12.02.2004 +0100, you wrote:
> > NutTcpCloseSocket?
>
>Almost, but that doesn't relieve me from notifying the threads blocking
>on NutTcpSend/Receive, does it? Ah, that may happen later automatically

If it works as intended, the close will broadcast
an event to all waiting threads. But not fully
sure after later mods done to these part. Some
waiting loops may reenter the NutEventWait, if
the action (characters received, connection established)
didn't happen. These loops should check the socket
status and quit the loop, if it's not in established
state.

If it fails, we should correct the loops. Generally
calling NutTcpCloseSocket() is the correct way to
terminate the receiver thread, IMHO.

Harald




More information about the En-Nut-Discussion mailing list