[En-Nut-Discussion] Using NutTcpReceive() and NutTcpSend() in different threads
Harald Kipp
harald.kipp at egnite.de
Wed Feb 5 10:00:26 CET 2003
Stephen,
Redefining NutEventWait(q, 0) from "waiting forever" to "no wait"
would break almost any application, wouldn't it?
Note, that NutEventWait is not only used on sockets, but any
I/O. And, after adding a few changes in 2.6.0 (thanks to Michael
Fischer), events are used as mutex semaphores too.
Btw. with these changes the second "if(*qhp == SIGNALED)"
was a left over and can be removed.
I'd recommend to add "#define NOWAIT 0xFFFFFFFF" and use
NutEventWait(q, NOWAIT). I'd prefer to explicitly set the
socket option, if you want non blocking and let blocking
be the default.
Harald
More information about the En-Nut-Discussion
mailing list