Poor function name: espconn_regist_time

User avatar
kolban
Posts: 131
Joined: Tue Jun 16, 2015 1:09 pm
Location: Fort Worth, Texas, USA

Poor function name: espconn_regist_time

Postby kolban » Tue Aug 11, 2015 12:36 am

I was studying the function called "espconn_regist_time" and believe that to be a poor function name. Its purpose is to define the timeout interval for a TCP connection.

A possible alternative might be "espconn_regist_timeout" but better yet would be "espconn_set_tcp_timeout".

On a broader note ... maybe we can find a way to review ALL the exposed SDK methods and see if their naming could be improved?

Neil

Veeda
Posts: 8
Joined: Mon Jul 06, 2015 2:02 am

Re: Poor function name: espconn_regist_time

Postby Veeda » Tue Aug 11, 2015 4:59 am

I agree, naming the functions properly could help a lot!

jinhucn
Posts: 20
Joined: Wed Dec 23, 2015 12:06 pm

Re: Poor function name: espconn_regist_time

Postby jinhucn » Wed Dec 23, 2015 12:15 pm

I'm looking for the function to set the timeout interval for tcp client connection. But sdk manual says it is for tcp server only. Dose it work with tcp client?

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

Re: Poor function name: espconn_regist_time

Postby ESP_Faye » Thu Dec 24, 2015 2:10 pm

Hi,

Sorry that espconn_regist_time only works in TCP server mode.

Maybe you could set a timer to check if ESP8266 received any data, and if not till time out, call espconn_disconnect to disconnect it.

Who is online

Users browsing this forum: No registered users and 2 guests