Rishi Khan wrote: > listen is blocking? Maybe you mean accept? In any case, I have code that > makes accept non-blocking and I sent it in as a patch before ... not > sure if it made it's way to the CVS repository.
It did, so accept does indeed support non-blocking mode in CVS (but not in lwIP 1.3.0). The basics of non-blocking connect() are simple - it's doing the proper error handling that is a little bit trickier. That means not letting the socket be fully usable until connected, setting the correct error codes such that getsockopt(SO_ERROR...) works, and posting an API event so that select would wake up. That probably also means changing alloc_socket to initialise sendevent to 0. Non-blocking send should be very easy I would have thought. Just check for sock->sendevent==0 in lwip_send() before calling netconn_write(). I would have thought anyway. Jifl -- eCosCentric Limited http://www.eCosCentric.com/ The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No 4422071. ------["Si fractum non sit, noli id reficere"]------ Opinions==mine _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
