Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

Async connect for WiFiClient ?

Open pgScorpio opened this issue 10 years ago • 3 comments

Basic Infos

Hardware

Hardware: ESP-12 Core Version: 2.2.0

Description

Problem description

At this moment WiFiClient::connect() is blocking until connected or error.

Especially when the server you are connecting to is offline this causes your sketch to freeze for a few seconds...... In a lot of cases this is not acceptable.

I think it should be possible to start a connect without blocking and check from loop if the connect succeeded or not.

pgScorpio avatar Jun 22 '16 22:06 pgScorpio

@pgScorpio check https://github.com/me-no-dev/ESPAsyncTCP

chaeplin avatar Jun 23 '16 06:06 chaeplin

Also, closing as duplicate of #922.

igrr avatar Jun 23 '16 07:06 igrr

Hi, guys. @igrr: this issue is kind of related to the one posted in #922. However, the actual problem with the blocking timeout of the function WifiClient.connect() isn't really addressed or solved. Or so it seems to me. Can we reanimate this thread, please?

miguelpom avatar Dec 22 '16 16:12 miguelpom