This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1294NCPDT: configuration lwip libraries to allow more connections on the same port

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: EK-TM4C1294XL

Dear all,
it is the first time that I use the lwip libraries and I need help to configure these (I don't use RTOS in my project).
I need to open more connection on the same port (Modbus TCP/IP).
I started/followed the example:

modbus.c - Modbus session support routines.
This is part of revision 2.1.0.12573 of the EK-TM4C1294XL Firmware Package.

and with only 1 connection the application works fine but I don't understand which parameters I must modify in the opt.h (or lwipopts.h) for solve my problem.

I try to use this configuration but the result it is the same.

//
// Initialize the application to listen on the requested modbus port.
//
pcb_ptr = tcp_new();
tcp_bind (pcb_ptr, IP_ADDR_ANY, usModbusPort);
pcb_ptr = tcp_listen (pcb_ptr);
pState->pListenPCB = pcb_ptr;

//
// Save the requested information and set the TCP callback functions and arguments.
//
tcp_arg (pcb_ptr, pState);
tcp_accept (pcb_ptr, ModbusAcceptSession1);

//
// Initialize the application to listen on the requested modbus port.
//
pcb_ptr = tcp_new();
tcp_bind(pcb_ptr, IP_ADDR_ANY, usModbusPort);
pcb_ptr = tcp_listen(pcb_ptr);
pState->pListenPCB = pcb_ptr;

//
// Save the requested information and set the TCP callback functions
// and arguments.
//
tcp_arg(pcb_ptr, pState);
tcp_accept(pcb_ptr, ModbusAcceptSession2);

Thanks