tcp_listen() — Make PCB listen for incoming connections
struct tcp_pcb *tcp_listen
(struct tcp_pcb *pcb
pcb to start listening for incoming connections.
When an incoming connection is accepted, the function specified with the
function will be called.
pcb must have been bound to a
local port with the
tcp_listen() function returns a new connection
identifier, and the one passed as an argument to the function will be
deallocated. The reason for this behavior is that less memory is needed
for a connection that is listening, so
will reclaim the memory needed for the original connection and allocate a
new smaller memory block for the listening connection.
tcp_listen() may return
no memory was available for the listening connection. If so, the memory
pcb will not be deallocated.
|2019-09-17||LWIP Documentation Notices|