[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Limiting the number of connections: Possible bug with M
From: |
Tony |
Subject: |
Re: [lwip-users] Limiting the number of connections: Possible bug with MEMP_NUM_TCP_PCB? |
Date: |
Fri, 4 Aug 2017 11:55:26 +0200 |
And one more thing:
In our app, when the network starts, the following code is how the listening is initialized. This was working OK in 1.3.2, but I suspect this breaks 2.0.2 and could cause the problems I see now. Is this a correct way to initialize the listening connection, or is this code wrong?
_tcppcb = tcp_new();
...
tcp_bind(_tcppcb, IP_ADDR_ANY, _port);
// tcp deallocates _pcb, see wiki of lwIP
struct tcp_pcb * listen_pcb = tcp_listen(_tcppcb);
...
_tcppcb = listen_pcb;
tcp_accept(_tcppcb, _netsrv_accept_cb);