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

Function tcp_poll

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

* @ingroup tcp_raw * Specifies the polling interval and the callback function that should * be called to poll the application. The interval is specified in * number of TCP coarse grained timer shots, which typically occurs * twice a second. An interval of 10 means that the application would * be polled every 5 seconds. * * When a connection is idle (i.e., no data is either transmitted or

Source from the content-addressed store, hash-verified

2102 * again when the connection has been idle for a while.
2103 */
2104void
2105tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval)
2106{
2107 LWIP_ASSERT_CORE_LOCKED();
2108
2109 LWIP_ERROR("tcp_poll: invalid pcb", pcb != NULL, return);
2110 LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN);
2111
2112#if LWIP_CALLBACK_API
2113 pcb->poll = poll;
2114#else /* LWIP_CALLBACK_API */
2115 LWIP_UNUSED_ARG(poll);
2116#endif /* LWIP_CALLBACK_API */
2117 pcb->pollinterval = interval;
2118}
2119
2120/**
2121 * Purges a TCP PCB. Removes any buffered data and frees the buffer memory

Callers 9

altcp_tcp_set_pollFunction · 0.70
altcp_tcp_closeFunction · 0.70
lwiperf_tcp_closeFunction · 0.50
lwiperf_tx_start_implFunction · 0.50
lwiperf_tcp_acceptFunction · 0.50
setup_tcpFunction · 0.50
accept_functionFunction · 0.50
api_msg.cFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected