mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-05 13:16:37 +08:00
refactor(lwip): Refactor LWIP UDP sync
This commit is contained in:
@ -2224,8 +2224,8 @@ void *memp_malloc_ll(size_t type);
|
||||
*/
|
||||
|
||||
#if ESP_UDP
|
||||
#if !LWIP_UDP || !LWIP_SOCKET || !ESP_LWIP
|
||||
#error "LWIP_UDP & LWIP_SOCKET & ESP_LWIP must be enable"
|
||||
#if !LWIP_UDP || !LWIP_SOCKET || !ESP_LWIP || !LWIP_NETIF_TX_SINGLE_PBUF
|
||||
#error "LWIP_UDP & LWIP_SOCKET & ESP_LWIP & LWIP_NETIF_TX_SINGLE_PBUF must be enable"
|
||||
#else
|
||||
#include "udp_sync.h"
|
||||
#endif
|
||||
|
@ -29,26 +29,30 @@ void udp_sync_init(void);
|
||||
*
|
||||
* @param in_msg message pointer
|
||||
*/
|
||||
void udp_sync_regitser(void *in_msg);
|
||||
void udp_sync_regitser_sock(void *in_msg);
|
||||
|
||||
/*
|
||||
* @brief ack the message
|
||||
*
|
||||
* @param in_msg message pointer
|
||||
*/
|
||||
void udp_sync_ack(void *in_msg);
|
||||
void udp_sync_ack_sock(void *in_msg);
|
||||
|
||||
/*
|
||||
* @brief set the current message send result
|
||||
*
|
||||
*
|
||||
* @param netif LwIP netif pointer
|
||||
* @param pbuf low-level netif output pbuf pointer
|
||||
* @param ret current message send result
|
||||
*/
|
||||
void udp_sync_set_ret(void *netif, int ret);
|
||||
void udp_sync_set_ret(void *netif, void *pbuf, int ret);
|
||||
|
||||
void udp_sync_cache_udp(void *pcb);
|
||||
|
||||
void udp_sync_clear_udp(void);
|
||||
|
||||
/*
|
||||
* @brief process the sync
|
||||
*
|
||||
* @param ret current message send result
|
||||
*/
|
||||
void udp_sync_proc(void);
|
||||
|
||||
@ -58,9 +62,18 @@ void udp_sync_proc(void);
|
||||
void udp_sync_trigger(void);
|
||||
|
||||
/**
|
||||
* @brief close the udp sync before close the socket
|
||||
* @brief close the udp pcb
|
||||
*
|
||||
* @param udp_pcb LwIP raw UDP pcb pointer
|
||||
*/
|
||||
void udp_sync_close(int s);
|
||||
void udp_sync_close_udp(void *udp_pcb);
|
||||
|
||||
/**
|
||||
* @brief close the udp sync netconn before close the socket
|
||||
*
|
||||
* @param netconn LwIP raw netconn pointer
|
||||
*/
|
||||
void udp_sync_close_netconn(void *netconn);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user