lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Re: Struggling to build a TCP echo server (Kieran Mansley)


From: Chen
Subject: [lwip-users] Re: Struggling to build a TCP echo server (Kieran Mansley)
Date: Fri, 13 Feb 2009 13:53:36 -0500

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 <address@hidden>
Subject: Re: [lwip-users] Struggling to build a TCP echo server
To: Mailing list for lwIP users <address@hidden>
Message-ID:
        <address@hidden>
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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]