* @ingroup netconn_udp * Disconnect a netconn from its current peer (only valid for UDP netconns). * * @param conn the netconn to disconnect * @return See @ref err_t */
| 406 | * @return See @ref err_t |
| 407 | */ |
| 408 | err_t |
| 409 | netconn_disconnect(struct netconn *conn) |
| 410 | { |
| 411 | API_MSG_VAR_DECLARE(msg); |
| 412 | err_t err; |
| 413 | |
| 414 | LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); |
| 415 | |
| 416 | API_MSG_VAR_ALLOC(msg); |
| 417 | API_MSG_VAR_REF(msg).conn = conn; |
| 418 | err = netconn_apimsg(lwip_netconn_do_disconnect, &API_MSG_VAR_REF(msg)); |
| 419 | API_MSG_VAR_FREE(msg); |
| 420 | |
| 421 | return err; |
| 422 | } |
| 423 | |
| 424 | /** |
| 425 | * @ingroup netconn_tcp |
no test coverage detected