A TCP server might handle many incoming connection requests, each one of
them will fire the accept callback.
That callback is responsible for acquiring any memory that it would need
for the application, and then will register callbacks for that instance
of the application. There is one instance per connection.
When the connection is closed, memory is freed and callbacks unregistered.

There is one accept callback per port, you listen on a port, which uses
a listening pcb (your calls to tcp_new() and tcp_bind() at init, your
'echo_pcb')
There is one set of callbacks per connection, each connection uses a new
pcb (your 'tpcb'), the listening pcb is always listening for other new
connections.

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to