* @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
| 2102 | * again when the connection has been idle for a while. |
| 2103 | */ |
| 2104 | void |
| 2105 | tcp_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 |
no outgoing calls
no test coverage detected