valid states for calling espconn_disconnect

tve
Posts: 123
Joined: Sun Feb 15, 2015 4:33 pm

valid states for calling espconn_disconnect

Postby tve » Tue Jul 28, 2015 2:43 pm

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?
Also, after calling espconn_disconnect() will I get a espconn_disconnect_callback?

tve
Posts: 123
Joined: Sun Feb 15, 2015 4:33 pm

Re: valid states for calling espconn_disconnect

Postby tve » Thu Jul 30, 2015 1:15 pm

Bump... Any chance to get an answer?
Thank you

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: valid states for calling espconn_disconnect

Postby ESP_Faye » Fri Jul 31, 2015 10:33 am

Hi,

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 !

tve
Posts: 123
Joined: Sun Feb 15, 2015 4:33 pm

Re: valid states for calling espconn_disconnect

Postby tve » Fri Jul 31, 2015 12:45 pm

Thanks for the responses.

Who is online

Users browsing this forum: No registered users and 28 guests