MeterLogger
espconn_tcp.h
Go to the documentation of this file.
1 #ifndef __ESPCONN_TCP_H__
2 #define __ESPCONN_TCP_H__
3 
4 #ifndef ESPCONN_TCP_DEBUG
5 #define ESPCONN_TCP_DEBUG LWIP_DBG_OFF
6 #endif
7 #include "lwip/app/espconn.h"
8 
9 #ifndef ESPCONN_TCP_TIMER
10 #define ESPCONN_TCP_TIMER 40
11 #endif
12 
13 #define espconn_keepalive_enable(pcb) ((pcb)->so_options |= SOF_KEEPALIVE)
14 #define espconn_keepalive_disable(pcb) ((pcb)->so_options &= ~SOF_KEEPALIVE)
15 
16 /******************************************************************************
17  * FunctionName : espconn_kill_oldest_pcb
18  * Description : A oldest incoming connection has been killed.
19  * Parameters : none
20  * Returns : none
21 *******************************************************************************/
22 
23 extern void espconn_kill_oldest_pcb(void);
24 
25 /******************************************************************************
26  * FunctionName : espconn_tcp_disconnect
27  * Description : A new incoming connection has been disconnected.
28  * Parameters : espconn -- the espconn used to disconnect with host
29  * Returns : none
30 *******************************************************************************/
31 
32 extern void espconn_tcp_disconnect(espconn_msg *pdiscon,u8 type);
33 
34 /******************************************************************************
35  * FunctionName : espconn_tcp_client
36  * Description : Initialize the client: set up a connect PCB and bind it to
37  * the defined port
38  * Parameters : espconn -- the espconn used to build client
39  * Returns : none
40 *******************************************************************************/
41 
42 extern sint8 espconn_tcp_client(struct espconn* espconn);
43 
44 /******************************************************************************
45  * FunctionName : espconn_tcp_server
46  * Description : Initialize the server: set up a listening PCB and bind it to
47  * the defined port
48  * Parameters : espconn -- the espconn used to build server
49  * Returns : none
50 *******************************************************************************/
51 
52 extern sint8 espconn_tcp_server(struct espconn *espconn);
53 
54 #endif /* __CLIENT_TCP_H__ */
55 
sint8 espconn_tcp_server(struct espconn *espconn)
Definition: espconn_tcp.c:1281
void espconn_tcp_disconnect(espconn_msg *pdiscon, u8 type)
Definition: espconn_tcp.c:498
unsigned char u8
Definition: c_types.h:46
void espconn_kill_oldest_pcb(void)
Definition: espconn_tcp.c:115
sint8 espconn_tcp_client(struct espconn *espconn)
Definition: espconn_tcp.c:878
signed char sint8
Definition: c_types.h:47