[Top][All Lists]

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

[lwip-users] Accepting TCP connections when out of PCBs

From: mario.gruber
Subject: [lwip-users] Accepting TCP connections when out of PCBs
Date: Tue, 27 Nov 2012 08:44:13 +0000

Hi all

I have a question regarding accepting client PCBs on a listening PCB:

Is it by design that the stack aborts an already connected PCB, if it fails to 
allocate a free TCP PCB from the memory pools to handle pending connection 
For example: With MEMP_NUM_TCP_PCB set to 2 and 2 established client 
connection, connection 1 gets dropped to accept client 3?

How do I protect my existing connections in this 'out of memory' situation?
Do I simply need to allocate enough TCP PCBs in the pool to handle the worst 
case burst of connection requests? 

I'm using RAW API 1.4.1 with memory pools enabled and backlog disabled.

#define TCP_LISTEN_BACKLOG          0
#define MEMP_NUM_TCP_PCB_LISTEN     1  
#define MEM_USE_POOLS               1
#define MEMP_NUM_TCP_PCB            2


reply via email to

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