incorrect espconn pointer in callbacks
incorrect espconn pointer in callbacks
Postby tve » Sun Jun 14, 2015 2:45 pm
For TCP connections the void *arg pointer passed to the espconn_reconnect_callback and the espconn_disconnect_callback functions has the value of the listening/accepting connection instead of the disconnected connection. This makes it difficult to find the connection that has been closed and release resources.
Re: incorrect espconn pointer in callbacks
Postby ESP_Faye » Mon Jun 15, 2015 10:25 am
Hi,
So sorry for the inconvenience.
Please refer to documentation "2C-ESP8266__SDK__Programming Guide" -> 8.Appendix -> 8.1 ESPCONN Programming -> 3. espconn callback
The pointer may be different in different callbacks, please use parameter remote_ip and remote_port instead.
Thanks for your interest in ESP8266 !
So sorry for the inconvenience.
Please refer to documentation "2C-ESP8266__SDK__Programming Guide" -> 8.Appendix -> 8.1 ESPCONN Programming -> 3. espconn callback
The pointer may be different in different callbacks, please use parameter remote_ip and remote_port instead.
Thanks for your interest in ESP8266 !
Re: incorrect espconn pointer in callbacks
Postby kolban » Thu Jul 09, 2015 12:35 pm
I think we may also be able to place context in a field of struct espconn called "reverse". I am thinking that if this is set in the connection callback then it will be passed in to other callbacks in the future. However ... I won't swear to that. There is a hint that this might be what is happening ... but there is no solid confirmation ... that I know off ... at this time.
Who is online
Users browsing this forum: No registered users and 31 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.