* @ingroup tcp_raw * Used to specify the function that should be called when a fatal error * has occurred on the connection. * * If a connection is aborted because of an error, the application is * alerted of this event by the err callback. Errors that might abort a * connection are when there is a shortage of memory. The callback * function to be called is set using the tcp_err() function
| 2054 | * has occurred on the connection |
| 2055 | */ |
| 2056 | void |
| 2057 | tcp_err(struct tcp_pcb *pcb, tcp_err_fn err) |
| 2058 | { |
| 2059 | LWIP_ASSERT_CORE_LOCKED(); |
| 2060 | if (pcb != NULL) { |
| 2061 | LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN); |
| 2062 | pcb->errf = err; |
| 2063 | } |
| 2064 | } |
| 2065 | |
| 2066 | /** |
| 2067 | * @ingroup tcp_raw |
no outgoing calls