@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 */
| 291 | * @param pcb the connection pcb which is not fully accepted yet |
| 292 | */ |
| 293 | void |
| 294 | tcp_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 |