Kieran, Thanks for your reply! What is the rule of thumb to allocate enough PCBs to handle multiple connections?
Any dos and donts for using lwIP in threads? Chen
Date: Fri, 13 Feb 2009 16:48:03 +0000 From: Kieran Mansley <[email protected]> Subject: Re: [lwip-users] Struggling to build a TCP echo server To: Mailing list for lwIP users <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain On Fri, 2009-02-13 at 10:50 -0500, Chen wrote: > First, thanks to all the helping hands from the group! > > Weighing my options, I decided to use "real" socket programming > instead of TCI_* raw APIs. > > Attached is the codes of a working echo server, running on FreeRTOS. > > After getting it to work, I tried to implement two echo servers on > FreeRTOS. > > I duplicated the codes to a different thread, on a different port, and > fired it up, none worked. It seems as long as I have one socket > opened, the other will not be able to work. Two things: 1) You should be very careful when using multiple threads with lwIP: it is not thread-safe. 2) You may not have allocated enough PCBs to handle multiple connections. Check your lwipopts.h Kieran
_______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
