ESP8266 Centre + NB
espconn.h
浏览该文件的文档.
1 /*
2  * ESPRSSIF MIT License
3  *
4  * Copyright (c) 2016 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD>
5  *
6  * Permission is hereby granted for use on ESPRESSIF SYSTEMS ESP8266 only, in which case,
7  * it is free of charge, to any person obtaining a copy of this software and associated
8  * documentation files (the "Software"), to deal in the Software without restriction, including
9  * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  * and/or sell copies of the Software, and to permit persons to whom the Software is furnished
11  * to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all copies or
14  * substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22  *
23  */
24 
25 #ifndef __ESPCONN_H__
26 #define __ESPCONN_H__
27 
28 typedef sint8 err_t;
29 
30 typedef void *espconn_handle;
31 typedef void (* espconn_connect_callback)(void *arg);
32 typedef void (* espconn_reconnect_callback)(void *arg, sint8 err);
33 
34 /* Definitions for error constants. */
35 
36 #define ESPCONN_OK 0 /* No error, everything OK. */
37 #define ESPCONN_MEM -1 /* Out of memory error. */
38 #define ESPCONN_TIMEOUT -3 /* Timeout. */
39 #define ESPCONN_RTE -4 /* Routing problem. */
40 #define ESPCONN_INPROGRESS -5 /* Operation in progress */
41 #define ESPCONN_MAXNUM -7 /* Total number exceeds the set maximum*/
42 
43 #define ESPCONN_ABRT -8 /* Connection aborted. */
44 #define ESPCONN_RST -9 /* Connection reset. */
45 #define ESPCONN_CLSD -10 /* Connection closed. */
46 #define ESPCONN_CONN -11 /* Not connected. */
47 
48 #define ESPCONN_ARG -12 /* Illegal argument. */
49 #define ESPCONN_IF -14 /* UDP send error */
50 #define ESPCONN_ISCONN -15 /* Already connected. */
51 
52 #define ESPCONN_HANDSHAKE -28 /* ssl handshake failed */
53 #define ESPCONN_SSL_INVALID_DATA -61 /* ssl application invalid */
54 
58  /* ESPCONN_TCP Group */
59  ESPCONN_TCP = 0x10,
60  /* ESPCONN_UDP Group */
61  ESPCONN_UDP = 0x20,
62 };
63 
73 };
74 
75 typedef struct _esp_tcp {
84 } esp_tcp;
85 
86 typedef struct _esp_udp {
91 } esp_udp;
92 
93 typedef struct _remot_info{
97 }remot_info;
98 
100 typedef void (* espconn_recv_callback)(void *arg, char *pdata, unsigned short len);
101 typedef void (* espconn_sent_callback)(void *arg);
102 
104 struct espconn {
109  union {
112  } proto;
117  void *reverse;
118 };
119 
124  ESPCONN_COPY = 0x04,
127 };
128 
133 };
134 
135 enum {
141 };
142 
144  uint16 sent_length; /* sent length successful*/
145  uint16 snd_buf_size; /* Available buffer size for sending */
146  uint16 snd_queuelen; /* Available buffer space for sending */
147  uint16 total_queuelen; /* total Available buffer space for sending */
148  uint32 packseqno; /* seqno to be sent */
149  uint32 packseq_nxt; /* seqno expected */
151 };
152 
153 struct mdns_info {
154  char *host_name;
155  char *server_name;
157  unsigned long ipAddr;
158  char *txt_data[10];
159 };
160 /******************************************************************************
161  * FunctionName : espconn_connect
162  * Description : The function given as the connect
163  * Parameters : espconn -- the espconn used to listen the connection
164  * Returns : none
165 *******************************************************************************/
166 
168 
169 /******************************************************************************
170  * FunctionName : espconn_disconnect
171  * Description : disconnect with host
172  * Parameters : espconn -- the espconn used to disconnect the connection
173  * Returns : none
174 *******************************************************************************/
175 
177 
178 /******************************************************************************
179  * FunctionName : espconn_delete
180  * Description : disconnect with host
181  * Parameters : espconn -- the espconn used to disconnect the connection
182  * Returns : none
183 *******************************************************************************/
184 
186 
187 /******************************************************************************
188  * FunctionName : espconn_accept
189  * Description : The function given as the listen
190  * Parameters : espconn -- the espconn used to listen the connection
191  * Returns : none
192 *******************************************************************************/
193 
195 
196 /******************************************************************************
197  * FunctionName : espconn_create
198  * Description : sent data for client or server
199  * Parameters : espconn -- espconn to the data transmission
200  * Returns : result
201 *******************************************************************************/
202 
204 
205 /******************************************************************************
206  * FunctionName : espconn_tcp_get_max_con
207  * Description : get the number of simulatenously active TCP connections
208  * Parameters : none
209  * Returns : none
210 *******************************************************************************/
211 
213 
214 /******************************************************************************
215  * FunctionName : espconn_tcp_set_max_con
216  * Description : set the number of simulatenously active TCP connections
217  * Parameters : num -- total number
218  * Returns : none
219 *******************************************************************************/
220 
222 
223 /******************************************************************************
224  * FunctionName : espconn_tcp_get_max_con_allow
225  * Description : get the count of simulatenously active connections on the server
226  * Parameters : espconn -- espconn to get the count
227  * Returns : result
228 *******************************************************************************/
229 
231 
232 /******************************************************************************
233  * FunctionName : espconn_tcp_set_max_con_allow
234  * Description : set the count of simulatenously active connections on the server
235  * Parameters : espconn -- espconn to set the count
236  * num -- support the connection number
237  * Returns : result
238 *******************************************************************************/
239 
241 
242 /******************************************************************************
243  * FunctionName : espconn_regist_time
244  * Description : used to specify the time that should be called when don't recv data
245  * Parameters : espconn -- the espconn used to the connection
246  * interval -- the timer when don't recv data
247  * Returns : none
248 *******************************************************************************/
249 
250 sint8 espconn_regist_time(struct espconn *espconn, uint32 interval, uint8 type_flag);
251 
252 /******************************************************************************
253  * FunctionName : espconn_get_connection_info
254  * Description : used to specify the function that should be called when disconnect
255  * Parameters : espconn -- espconn to set the err callback
256  * discon_cb -- err callback function to call when err
257  * Returns : none
258 *******************************************************************************/
259 
260 sint8 espconn_get_connection_info(struct espconn *pespconn, remot_info **pcon_info, uint8 typeflags);
261 
262 /******************************************************************************
263  * FunctionName : espconn_get_packet_info
264  * Description : get the packet info with host
265  * Parameters : espconn -- the espconn used to disconnect the connection
266  * infoarg -- the packet info
267  * Returns : the errur code
268 *******************************************************************************/
269 
271 
272 /******************************************************************************
273  * FunctionName : espconn_regist_sentcb
274  * Description : Used to specify the function that should be called when data
275  * has been successfully delivered to the remote host.
276  * Parameters : struct espconn *espconn -- espconn to set the sent callback
277  * espconn_sent_callback sent_cb -- sent callback function to
278  * call for this espconn when data is successfully sent
279  * Returns : none
280 *******************************************************************************/
281 
283 
284 /******************************************************************************
285  * FunctionName : espconn_regist_sentcb
286  * Description : Used to specify the function that should be called when data
287  * has been successfully delivered to the remote host.
288  * Parameters : espconn -- espconn to set the sent callback
289  * sent_cb -- sent callback function to call for this espconn
290  * when data is successfully sent
291  * Returns : none
292 *******************************************************************************/
293 
295 
296 /******************************************************************************
297  * FunctionName : espconn_send
298  * Description : sent data for client or server
299  * Parameters : espconn -- espconn to set for client or server
300  * psent -- data to send
301  * length -- length of data to send
302  * Returns : none
303 *******************************************************************************/
304 
305 sint8 espconn_send(struct espconn *espconn, uint8 *psent, uint16 length);
306 
307 /******************************************************************************
308  * FunctionName : espconn_sent
309  * Description : sent data for client or server
310  * Parameters : espconn -- espconn to set for client or server
311  * psent -- data to send
312  * length -- length of data to send
313  * Returns : none
314 *******************************************************************************/
315 
316 sint8 espconn_sent(struct espconn *espconn, uint8 *psent, uint16 length);
317 
318 /******************************************************************************
319  * FunctionName : espconn_sendto
320  * Description : send data for UDP
321  * Parameters : espconn -- espconn to set for UDP
322  * psent -- data to send
323  * length -- length of data to send
324  * Returns : error
325 *******************************************************************************/
326 
327 sint16 espconn_sendto(struct espconn *espconn, uint8 *psent, uint16 length);
328 
329 /******************************************************************************
330  * FunctionName : espconn_regist_connectcb
331  * Description : used to specify the function that should be called when
332  * connects to host.
333  * Parameters : espconn -- espconn to set the connect callback
334  * connect_cb -- connected callback function to call when connected
335  * Returns : none
336 *******************************************************************************/
337 
339 
340 /******************************************************************************
341  * FunctionName : espconn_regist_recvcb
342  * Description : used to specify the function that should be called when recv
343  * data from host.
344  * Parameters : espconn -- espconn to set the recv callback
345  * recv_cb -- recv callback function to call when recv data
346  * Returns : none
347 *******************************************************************************/
348 
350 
351 /******************************************************************************
352  * FunctionName : espconn_regist_reconcb
353  * Description : used to specify the function that should be called when connection
354  * because of err disconnect.
355  * Parameters : espconn -- espconn to set the err callback
356  * recon_cb -- err callback function to call when err
357  * Returns : none
358 *******************************************************************************/
359 
361 
362 /******************************************************************************
363  * FunctionName : espconn_regist_disconcb
364  * Description : used to specify the function that should be called when disconnect
365  * Parameters : espconn -- espconn to set the err callback
366  * discon_cb -- err callback function to call when err
367  * Returns : none
368 *******************************************************************************/
369 
371 
372 /******************************************************************************
373  * FunctionName : espconn_port
374  * Description : access port value for client so that we don't end up bouncing
375  * all connections at the same time .
376  * Parameters : none
377  * Returns : access port value
378 *******************************************************************************/
379 
380 uint32 espconn_port(void);
381 
382 /******************************************************************************
383  * FunctionName : espconn_set_opt
384  * Description : access port value for client so that we don't end up bouncing
385  * all connections at the same time .
386  * Parameters : none
387  * Returns : access port value
388 *******************************************************************************/
389 
391 
392 /******************************************************************************
393  * FunctionName : espconn_clear_opt
394  * Description : clear the option for connections so that we don't end up bouncing
395  * all connections at the same time .
396  * Parameters : espconn -- the espconn used to set the connection
397  * opt -- the option for clear
398  * Returns : the result
399 *******************************************************************************/
400 
402 
403 /******************************************************************************
404  * FunctionName : espconn_set_keepalive
405  * Description : access level value for connection so that we set the value for
406  * keep alive
407  * Parameters : espconn -- the espconn used to set the connection
408  * level -- the connection's level
409  * value -- the value of time(s)
410  * Returns : access port value
411 *******************************************************************************/
412 
413 sint8 espconn_set_keepalive(struct espconn *espconn, uint8 level, void* optarg);
414 
415 /******************************************************************************
416  * FunctionName : espconn_get_keepalive
417  * Description : access level value for connection so that we get the value for
418  * keep alive
419  * Parameters : espconn -- the espconn used to get the connection
420  * level -- the connection's level
421  * Returns : access keep alive value
422 *******************************************************************************/
423 
424 sint8 espconn_get_keepalive(struct espconn *espconn, uint8 level, void *optarg);
425 
426 /******************************************************************************
427  * TypedefName : dns_found_callback
428  * Description : Callback which is invoked when a hostname is found.
429  * Parameters : name -- pointer to the name that was looked up.
430  * ipaddr -- pointer to an ip_addr_t containing the IP address of
431  * the hostname, or NULL if the name could not be found (or on any
432  * other error).
433  * callback_arg -- a user-specified callback argument passed to
434  * dns_gethostbyname
435 *******************************************************************************/
436 
437 typedef void (*dns_found_callback)(const char *name, ip_addr_t *ipaddr, void *callback_arg);
438 
439 /******************************************************************************
440  * FunctionName : espconn_gethostbyname
441  * Description : Resolve a hostname (string) into an IP address.
442  * Parameters : pespconn -- espconn to resolve a hostname
443  * hostname -- the hostname that is to be queried
444  * addr -- pointer to a ip_addr_t where to store the address if
445  * it is already cached in the dns_table (only valid if ESPCONN_OK
446  * is returned!)
447  * found -- a callback function to be called on success, failure
448  * or timeout (only if ERR_INPROGRESS is returned!)
449  * Returns : err_t return code
450  * - ESPCONN_OK if hostname is a valid IP address string or the host
451  * name is already in the local names table.
452  * - ESPCONN_INPROGRESS enqueue a request to be sent to the DNS server
453  * for resolution if no errors are present.
454  * - ESPCONN_ARG: dns client not initialized or invalid hostname
455 *******************************************************************************/
456 
457 err_t espconn_gethostbyname(struct espconn *pespconn, const char *hostname, ip_addr_t *addr, dns_found_callback found);
458 
459 /******************************************************************************
460  * FunctionName : espconn_abort
461  * Description : Forcely abort with host
462  * Parameters : espconn -- the espconn used to connect with the host
463  * Returns : result
464 *******************************************************************************/
465 
467 
468 /******************************************************************************
469  * FunctionName : espconn_encry_connect
470  * Description : The function given as connection
471  * Parameters : espconn -- the espconn used to connect with the host
472  * Returns : none
473 *******************************************************************************/
474 
476 
477 /******************************************************************************
478  * FunctionName : espconn_encry_disconnect
479  * Description : The function given as the disconnection
480  * Parameters : espconn -- the espconn used to disconnect with the host
481  * Returns : none
482 *******************************************************************************/
483 
485 
486 /******************************************************************************
487  * FunctionName : espconn_secure_send
488  * Description : sent data for client or server
489  * Parameters : espconn -- espconn to set for client or server
490  * psent -- data to send
491  * length -- length of data to send
492  * Returns : none
493 *******************************************************************************/
494 
495 sint8 espconn_secure_send(struct espconn *espconn, uint8 *psent, uint16 length);
496 
497 /******************************************************************************
498  * FunctionName : espconn_encry_sent
499  * Description : sent data for client or server
500  * Parameters : espconn -- espconn to set for client or server
501  * psent -- data to send
502  * length -- length of data to send
503  * Returns : none
504 *******************************************************************************/
505 
506 sint8 espconn_secure_sent(struct espconn *espconn, uint8 *psent, uint16 length);
507 
508 /******************************************************************************
509  * FunctionName : espconn_secure_set_size
510  * Description : set the buffer size for client or server
511  * Parameters : level -- set for client or server
512  * 1: client,2:server,3:client and server
513  * size -- buffer size
514  * Returns : true or false
515 *******************************************************************************/
516 
518 
519 /******************************************************************************
520  * FunctionName : espconn_secure_get_size
521  * Description : get buffer size for client or server
522  * Parameters : level -- set for client or server
523  * 1: client,2:server,3:client and server
524  * Returns : buffer size for client or server
525 *******************************************************************************/
526 
528 
529 /******************************************************************************
530  * FunctionName : espconn_secure_ca_enable
531  * Description : enable the certificate authenticate and set the flash sector
532  * as client or server
533  * Parameters : level -- set for client or server
534  * 1: client,2:server,3:client and server
535  * flash_sector -- flash sector for save certificate
536  * Returns : result true or false
537 *******************************************************************************/
538 
539 bool espconn_secure_ca_enable(uint8 level, uint32 flash_sector );
540 
541 /******************************************************************************
542  * FunctionName : espconn_secure_ca_disable
543  * Description : disable the certificate authenticate as client or server
544  * Parameters : level -- set for client or server
545  * 1: client,2:server,3:client and server
546  * Returns : result true or false
547 *******************************************************************************/
548 
549 bool espconn_secure_ca_disable(uint8 level);
550 
551 
552 /******************************************************************************
553  * FunctionName : espconn_secure_cert_req_enable
554  * Description : enable the client certificate authenticate and set the flash sector
555  * as client or server
556  * Parameters : level -- set for client or server
557  * 1: client,2:server,3:client and server
558  * flash_sector -- flash sector for save certificate
559  * Returns : result true or false
560 *******************************************************************************/
561 
562 bool espconn_secure_cert_req_enable(uint8 level, uint32 flash_sector );
563 
564 /******************************************************************************
565  * FunctionName : espconn_secure_ca_disable
566  * Description : disable the client certificate authenticate as client or server
567  * Parameters : level -- set for client or server
568  * 1: client,2:server,3:client and server
569  * Returns : result true or false
570 *******************************************************************************/
571 
573 
574 /******************************************************************************
575  * FunctionName : espconn_secure_set_default_certificate
576  * Description : Load the certificates in memory depending on compile-time
577  * and user options.
578  * Parameters : certificate -- Load the certificate
579  * length -- Load the certificate length
580  * Returns : result true or false
581 *******************************************************************************/
582 
583 bool espconn_secure_set_default_certificate(const uint8* certificate, uint16 length);
584 
585 /******************************************************************************
586  * FunctionName : espconn_secure_set_default_private_key
587  * Description : Load the key in memory depending on compile-time
588  * and user options.
589  * Parameters : private_key -- Load the key
590  * length -- Load the key length
591  * Returns : result true or false
592 *******************************************************************************/
593 
594 bool espconn_secure_set_default_private_key(const uint8* private_key, uint16 length);
595 
596 /******************************************************************************
597  * FunctionName : espconn_secure_accept
598  * Description : The function given as the listen
599  * Parameters : espconn -- the espconn used to listen the connection
600  * Returns : result
601 *******************************************************************************/
602 
604 
605 /******************************************************************************
606  * FunctionName : espconn_secure_accepts
607  * Description : delete the secure server host
608  * Parameters : espconn -- the espconn used to listen the connection
609  * Returns : result
610 *******************************************************************************/
611 
613 
614 /******************************************************************************
615  * FunctionName : espconn_igmp_join
616  * Description : join a multicast group
617  * Parameters : host_ip -- the ip address of udp server
618  * multicast_ip -- multicast ip given by user
619  * Returns : none
620 *******************************************************************************/
621 sint8 espconn_igmp_join(ip_addr_t *host_ip, ip_addr_t *multicast_ip);
622 
623 /******************************************************************************
624  * FunctionName : espconn_igmp_leave
625  * Description : leave a multicast group
626  * Parameters : host_ip -- the ip address of udp server
627  * multicast_ip -- multicast ip given by user
628  * Returns : none
629 *******************************************************************************/
630 sint8 espconn_igmp_leave(ip_addr_t *host_ip, ip_addr_t *multicast_ip);
631 
632 /******************************************************************************
633  * FunctionName : espconn_recv_hold
634  * Description : hold tcp receive
635  * Parameters : espconn -- espconn to hold
636  * Returns : none
637 *******************************************************************************/
638 sint8 espconn_recv_hold(struct espconn *pespconn);
639 
640 /******************************************************************************
641  * FunctionName : espconn_recv_unhold
642  * Description : unhold tcp receive
643  * Parameters : espconn -- espconn to unhold
644  * Returns : none
645 *******************************************************************************/
646 sint8 espconn_recv_unhold(struct espconn *pespconn);
647 
648 /******************************************************************************
649  * FunctionName : espconn_mdns_init
650  * Description : register a device with mdns
651  * Parameters : ipAddr -- the ip address of device
652  * hostname -- the hostname of device
653  * Returns : none
654 *******************************************************************************/
655 
656 void espconn_mdns_init(struct mdns_info *info);
657 /******************************************************************************
658  * FunctionName : espconn_mdns_close
659  * Description : close a device with mdns
660  * Parameters : a
661  * Returns : none
662 *******************************************************************************/
663 
664 void espconn_mdns_close(void);
665 /******************************************************************************
666  * FunctionName : espconn_mdns_server_register
667  * Description : register a device with mdns
668  * Parameters : a
669  * Returns : none
670 *******************************************************************************/
672 
673 /******************************************************************************
674  * FunctionName : espconn_mdns_server_unregister
675  * Description : unregister a device with mdns
676  * Parameters : a
677  * Returns : none
678 *******************************************************************************/
680 
681 /******************************************************************************
682  * FunctionName : espconn_mdns_get_servername
683  * Description : get server name of device with mdns
684  * Parameters : a
685  * Returns : none
686 *******************************************************************************/
687 
688 char* espconn_mdns_get_servername(void);
689 /******************************************************************************
690  * FunctionName : espconn_mdns_set_servername
691  * Description : set server name of device with mdns
692  * Parameters : a
693  * Returns : none
694 *******************************************************************************/
695 void espconn_mdns_set_servername(const char *name);
696 
697 /******************************************************************************
698  * FunctionName : espconn_mdns_set_hostname
699  * Description : set host name of device with mdns
700  * Parameters : a
701  * Returns : none
702 *******************************************************************************/
703 void espconn_mdns_set_hostname(char *name);
704 
705 /******************************************************************************
706  * FunctionName : espconn_mdns_get_hostname
707  * Description : get host name of device with mdns
708  * Parameters : a
709  * Returns : none
710 *******************************************************************************/
711 char* espconn_mdns_get_hostname(void);
712 
713 /******************************************************************************
714  * FunctionName : espconn_mdns_disable
715  * Description : disable a device with mdns
716  * Parameters : a
717  * Returns : none
718 *******************************************************************************/
719 void espconn_mdns_disable(void);
720 
721 /******************************************************************************
722  * FunctionName : espconn_mdns_enable
723  * Description : disable a device with mdns
724  * Parameters : a
725  * Returns : none
726 *******************************************************************************/
727 void espconn_mdns_enable(void);
728 /******************************************************************************
729  * FunctionName : espconn_dns_setserver
730  * Description : Initialize one of the DNS servers.
731  * Parameters : numdns -- the index of the DNS server to set must
732  * be < DNS_MAX_SERVERS = 2
733  * dnsserver -- IP address of the DNS server to set
734  * Returns : none
735 *******************************************************************************/
736 void espconn_dns_setserver(char numdns, ip_addr_t *dnsserver);
737 
738 #endif
739 
Definition: espconn.h:131
Definition: espconn.h:138
uint8 remote_ip[4]
Definition: espconn.h:96
sint16 espconn_sendto(struct espconn *espconn, uint8 *psent, uint16 length)
Definition: espconn.h:122
Definition: espconn.h:86
sint8 espconn_secure_delete(struct espconn *espconn)
sint8 espconn_accept(struct espconn *espconn)
char * server_name
Definition: espconn.h:155
esp_udp * udp
Definition: espconn.h:111
Definition: espconn.h:66
Definition: espconn.h:71
sint8 espconn_regist_write_finish(struct espconn *espconn, espconn_connect_callback write_finish_fn)
sint8 espconn_secure_send(struct espconn *espconn, uint8 *psent, uint16 length)
int local_port
Definition: espconn.h:88
uint32 espconn_port(void)
err_t espconn_gethostbyname(struct espconn *pespconn, const char *hostname, ip_addr_t *addr, dns_found_callback found)
sint8 espconn_secure_disconnect(struct espconn *espconn)
Definition: espconn.h:132
sint8 espconn_send(struct espconn *espconn, uint8 *psent, uint16 length)
void espconn_mdns_close(void)
esp_tcp * tcp
Definition: espconn.h:110
sint16 espconn_secure_get_size(uint8 level)
sint8 espconn_tcp_set_max_con_allow(struct espconn *espconn, uint8 num)
void espconn_mdns_set_servername(const char *name)
struct _esp_tcp esp_tcp
Definition: espconn.h:70
void(* espconn_reconnect_callback)(void *arg, sint8 err)
Definition: espconn.h:32
sint8 espconn_secure_sent(struct espconn *espconn, uint8 *psent, uint16 length)
void espconn_mdns_server_unregister(void)
sint8 espconn_igmp_leave(ip_addr_t *host_ip, ip_addr_t *multicast_ip)
int local_port
Definition: espconn.h:77
Definition: espconn.h:61
uint8 link_cnt
Definition: espconn.h:116
void espconn_mdns_init(struct mdns_info *info)
unsigned short uint16
Definition: c_types.h:48
espconn_option
Definition: espconn.h:120
bool espconn_secure_set_default_private_key(const uint8 *private_key, uint16 length)
void(* espconn_sent_callback)(void *arg)
Definition: espconn.h:101
Definition: espconn.h:67
void espconn_mdns_disable(void)
Definition: ip_addr.h:30
void(* espconn_recv_callback)(void *arg, char *pdata, unsigned short len)
Definition: espconn.h:100
Definition: espconn.h:130
enum espconn_state state
Definition: espconn.h:94
sint8 espconn_abort(struct espconn *espconn)
Definition: espconn.h:93
uint32 packseqno
Definition: espconn.h:148
int remote_port
Definition: espconn.h:76
sint8 espconn_set_keepalive(struct espconn *espconn, uint8 level, void *optarg)
sint8 espconn_get_keepalive(struct espconn *espconn, uint8 level, void *optarg)
Definition: espconn.h:140
void espconn_mdns_server_register(void)
bool espconn_secure_set_default_certificate(const uint8 *certificate, uint16 length)
sint8 espconn_get_packet_info(struct espconn *espconn, struct espconn_packet *infoarg)
espconn_connect_callback connect_callback
Definition: espconn.h:80
void espconn_dns_setserver(char numdns, ip_addr_t *dnsserver)
Definition: espconn.h:137
espconn_level
Definition: espconn.h:129
struct _remot_info remot_info
sint8 espconn_create(struct espconn *espconn)
sint8 espconn_regist_sentcb(struct espconn *espconn, espconn_sent_callback sent_cb)
Definition: espconn.h:125
bool espconn_secure_ca_disable(uint8 level)
Definition: espconn.h:57
sint8 espconn_disconnect(struct espconn *espconn)
bool espconn_secure_cert_req_disable(uint8 level)
char * espconn_mdns_get_hostname(void)
signed short sint16
Definition: c_types.h:50
unsigned long ipAddr
Definition: espconn.h:157
void * espconn_handle
Definition: espconn.h:30
espconn_type
Definition: espconn.h:56
unsigned char uint8
Definition: c_types.h:43
sint8 err_t
Definition: espconn.h:28
uint16 snd_buf_size
Definition: espconn.h:145
sint8 espconn_tcp_get_max_con_allow(struct espconn *espconn)
Definition: espconn.h:123
uint8 local_ip[4]
Definition: espconn.h:89
Definition: espconn.h:75
sint8 espconn_sent(struct espconn *espconn, uint8 *psent, uint16 length)
espconn_connect_callback write_finish_fn
Definition: espconn.h:83
void espconn_mdns_enable(void)
sint8 espconn_set_opt(struct espconn *espconn, uint8 opt)
int remote_port
Definition: espconn.h:87
sint8 espconn_regist_connectcb(struct espconn *espconn, espconn_connect_callback connect_cb)
Definition: espconn.h:69
sint8 espconn_secure_accept(struct espconn *espconn)
sint8 espconn_tcp_set_max_con(uint8 num)
sint8 espconn_recv_hold(struct espconn *pespconn)
void espconn_mdns_set_hostname(char *name)
uint16 server_port
Definition: espconn.h:156
void(* espconn_connect_callback)(void *arg)
Definition: espconn.h:31
unsigned int uint32
Definition: c_types.h:52
uint32 packseq_nxt
Definition: espconn.h:149
sint8 espconn_connect(struct espconn *espconn)
sint8 espconn_secure_connect(struct espconn *espconn)
bool espconn_secure_set_size(uint8 level, uint16 size)
sint8 espconn_regist_time(struct espconn *espconn, uint32 interval, uint8 type_flag)
char * espconn_mdns_get_servername(void)
Definition: espconn.h:126
uint8 remote_ip[4]
Definition: espconn.h:79
Definition: espconn.h:124
espconn_reconnect_callback reconnect_callback
Definition: espconn.h:81
Definition: espconn.h:104
Definition: espconn.h:136
Definition: espconn.h:143
uint8 remote_ip[4]
Definition: espconn.h:90
enum espconn_type type
Definition: espconn.h:106
enum espconn_state state
Definition: espconn.h:108
sint8 espconn_regist_recvcb(struct espconn *espconn, espconn_recv_callback recv_cb)
sint8 espconn_delete(struct espconn *espconn)
sint8 espconn_igmp_join(ip_addr_t *host_ip, ip_addr_t *multicast_ip)
espconn_connect_callback disconnect_callback
Definition: espconn.h:82
uint16 sent_length
Definition: espconn.h:144
Definition: espconn.h:153
uint16 snd_queuelen
Definition: espconn.h:146
char * txt_data[10]
Definition: espconn.h:158
struct _esp_udp esp_udp
Definition: espconn.h:139
union espconn::@3 proto
LOCAL int size
Definition: user_json.c:34
uint8 local_ip[4]
Definition: espconn.h:78
uint16 total_queuelen
Definition: espconn.h:147
espconn_recv_callback recv_callback
Definition: espconn.h:114
uint8 espconn_tcp_get_max_con(void)
signed char sint8
Definition: c_types.h:45
bool espconn_secure_ca_enable(uint8 level, uint32 flash_sector)
void(* dns_found_callback)(const char *name, ip_addr_t *ipaddr, void *callback_arg)
Definition: espconn.h:437
sint8 espconn_regist_reconcb(struct espconn *espconn, espconn_reconnect_callback recon_cb)
sint8 espconn_clear_opt(struct espconn *espconn, uint8 opt)
bool espconn_secure_cert_req_enable(uint8 level, uint32 flash_sector)
Definition: espconn.h:121
uint32 packnum
Definition: espconn.h:150
Definition: espconn.h:59
void * reverse
Definition: espconn.h:117
char * host_name
Definition: espconn.h:154
sint8 espconn_regist_disconcb(struct espconn *espconn, espconn_connect_callback discon_cb)
espconn_sent_callback sent_callback
Definition: espconn.h:115
Definition: espconn.h:68
espconn_state
Definition: espconn.h:65
sint8 espconn_get_connection_info(struct espconn *pespconn, remot_info **pcon_info, uint8 typeflags)
Definition: espconn.h:72
sint8 espconn_recv_unhold(struct espconn *pespconn)
int remote_port
Definition: espconn.h:95