MeterLogger
espconn_udp.h
Go to the documentation of this file.
1 #ifndef __ESPCONN_UDP_H__
2 #define __ESPCONN_UDP_H__
3 
4 #ifndef ESPCONN_UDP_DEBUG
5 #define ESPCONN_UDP_DEBUG LWIP_DBG_OFF
6 #endif
7 
8 #include "lwip/app/espconn.h"
9 
10 /******************************************************************************
11  * FunctionName : espconn_udp_client
12  * Description : Initialize the client: set up a PCB and bind it to the port
13  * Parameters : pespconn -- the espconn used to build client
14  * Returns : none
15 *******************************************************************************/
16 
17 extern sint8 espconn_udp_client(struct espconn *pespconn);
18 
19 /******************************************************************************
20  * FunctionName : espconn_udp_disconnect
21  * Description : A new incoming connection has been disconnected.
22  * Parameters : espconn -- the espconn used to disconnect with host
23  * Returns : none
24 *******************************************************************************/
25 
26 extern void espconn_udp_disconnect(espconn_msg *pdiscon);
27 
28 /******************************************************************************
29  * FunctionName : espconn_udp_server
30  * Description : Initialize the server: set up a PCB and bind it to the port
31  * Parameters : pespconn -- the espconn used to build server
32  * Returns : none
33 *******************************************************************************/
34 
35 extern sint8 espconn_udp_server(struct espconn *espconn);
36 
37 /******************************************************************************
38  * FunctionName : espconn_udp_sent
39  * Description : sent data for client or server
40  * Parameters : void *arg -- client or server to send
41  * uint8* psent -- Data to send
42  * uint16 length -- Length of data to send
43  * Returns : none
44 *******************************************************************************/
45 
46 extern err_t espconn_udp_sent(void *arg, uint8 *psent, uint16 length);
47 
48 /******************************************************************************
49  * FunctionName : espconn_udp_sendto
50  * Description : sent data for UDP
51  * Parameters : void *arg -- UDP to send
52  * uint8* psent -- Data to send
53  * uint16 length -- Length of data to send
54  * Returns : return espconn error code.
55  * - ESPCONN_OK. Successful. No error occured.
56  * - ESPCONN_MEM. Out of memory.
57  * - ESPCONN_RTE. Could not find route to destination address.
58  * - More errors could be returned by lower protocol layers.
59 *******************************************************************************/
60 extern err_t espconn_udp_sendto(void *arg, uint8 *psent, uint16 length);
61 
62 #endif /* __ESPCONN_UDP_H__ */
63 
64 
err_t espconn_udp_sendto(void *arg, uint8 *psent, uint16 length)
Definition: espconn_udp.c:183
unsigned short uint16
Definition: c_types.h:50
void espconn_udp_disconnect(espconn_msg *pdiscon)
Definition: espconn_udp.c:338
unsigned char uint8
Definition: c_types.h:45
s8_t err_t
Definition: err.h:47
sint8 espconn_udp_client(struct espconn *pespconn)
sint8 espconn_udp_server(struct espconn *espconn)
Definition: espconn_udp.c:363
signed char sint8
Definition: c_types.h:47
err_t espconn_udp_sent(void *arg, uint8 *psent, uint16 length)
Definition: espconn_udp.c:81