lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] the problem continious with my TCP connection socket


From: Kieran Mansley
Subject: Re: [lwip-users] the problem continious with my TCP connection socket
Date: Tue, 29 Sep 2009 12:18:57 +0100

A few obvious things are:

1) you're using the select() API incorrectly.  This is just like normal
select: you need to reset the acceptset each time you go round the loop.

> /* Number of raw connection PCBs */
> #define MEMP_NUM_RAW_PCB                10

You don't need any of those, I think.

> /* MEMP_NUM_TCP_PCB: the number of simultaneously active TCP
> connections. */
> #define MEMP_NUM_TCP_PCB        12

You need more than 12 of those: at least 16 (as I think I mentioned
before): one for each listening socket and one for each data socket.

You should increase the number of netbufs and netconns to match.

Most likely there is some resource shortage (e.g. PCBs, buffers, or
similar) after accepting the first connection that means the others are
dropped.  If you can turn on debug in lwIP, or access the lwIP stats,
these should help show you what is going wrong and so point the way to
correcting it.

Kieran






reply via email to

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