ESP8266 Developer Zone The Official ESP8266 Forum 2015-07-31T12:45:44+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=844 2015-07-31T12:45:44+08:00 2015-07-31T12:45:44+08:00 https://bbs.espressif.com:443/viewtopic.php?t=844&p=2968#p2968 <![CDATA[Re: valid states for calling espconn_disconnect]]> Statistics: Posted by tve — Fri Jul 31, 2015 12:45 pm


]]>
2015-07-31T10:33:00+08:00 2015-07-31T10:33:00+08:00 https://bbs.espressif.com:443/viewtopic.php?t=844&p=2949#p2949 <![CDATA[Re: valid states for calling espconn_disconnect]]>
So sorry for the late reply..

tve wrote:
Is it valid and safe to call espconn_disconnect():
after calling espconn_connect and before espconn_connect_callback is received?
after calling espconn_sent and before espconn_sent_callback is received?


-> Please do not do that.. It is not safe. We will optimize this in next SDK, but still, please do not do that.

tve wrote:
after calling espconn_disconnect() will I get a espconn_disconnect_callback?

-> If you registered a disconnect callback, you will get a disconnect callback after calling espconn_disconnect(). If the TCP connection broke unexpected, it will enter espconn_reconnect_callback ( if you registered one).

Thanks for your interest in Espressif Systems and ESP8266 !

Statistics: Posted by ESP_Faye — Fri Jul 31, 2015 10:33 am


]]>
2015-07-30T13:15:27+08:00 2015-07-30T13:15:27+08:00 https://bbs.espressif.com:443/viewtopic.php?t=844&p=2935#p2935 <![CDATA[Re: valid states for calling espconn_disconnect]]> Thank you

Statistics: Posted by tve — Thu Jul 30, 2015 1:15 pm


]]>
2015-07-28T14:43:28+08:00 2015-07-28T14:43:28+08:00 https://bbs.espressif.com:443/viewtopic.php?t=844&p=2897#p2897 <![CDATA[valid states for calling espconn_disconnect]]>
  • after calling espconn_connect and before espconn_connect_callback is received?
  • after calling espconn_sent and before espconn_sent_callback is received?
Also, after calling espconn_disconnect() will I get a espconn_disconnect_callback?

Statistics: Posted by tve — Tue Jul 28, 2015 2:43 pm


]]>