in reply to Re: non-blocking listen on a tcp server
in thread non-blocking listen on a tcp server
I'd avoid this route. Basically, it involves implementing a limited form of cooperative multitasking from scratch. Here are some examples:
Example with sentinel ("\n") terminated messages
Example with length-prefixed messages
Update: I've added replies to the examples linked above that show simpler alternatives to using select.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: non-blocking listen on a tcp server
by monkeyfish (Initiate) on Jun 09, 2010 at 22:57 UTC | |
by ikegami (Patriarch) on Jun 09, 2010 at 23:40 UTC |