MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / tcp_backlog_delayed

Function tcp_backlog_delayed

components/net/lwip/lwip-2.1.2/src/core/tcp.c:293–305  ·  view source on GitHub ↗

@ingroup tcp_raw * Delay accepting a connection in respect to the listen backlog: * the number of outstanding connections is increased until * tcp_backlog_accepted() is called. * * ATTENTION: the caller is responsible for calling tcp_backlog_accepted() * or else the backlog feature will get out of sync! * * @param pcb the connection pcb which is not fully accepted yet */

Source from the content-addressed store, hash-verified

291 * @param pcb the connection pcb which is not fully accepted yet
292 */
293void
294tcp_backlog_delayed(struct tcp_pcb *pcb)
295{
296 LWIP_ASSERT("pcb != NULL", pcb != NULL);
297 LWIP_ASSERT_CORE_LOCKED();
298 if ((pcb->flags & TF_BACKLOGPEND) == 0) {
299 if (pcb->listener != NULL) {
300 pcb->listener->accepts_pending++;
301 LWIP_ASSERT("accepts_pending != 0", pcb->listener->accepts_pending != 0);
302 tcp_set_flags(pcb, TF_BACKLOGPEND);
303 }
304 }
305}
306
307/** @ingroup tcp_raw
308 * A delayed-accept a connection is accepted (or closed/aborted): decreases

Callers 1

accept_functionFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected