[Net] Non-blocking WebSocket hostname resolution.

Hostname is now resolved during poll in WebSocketClient (wslay) to avoid
blocking during connect.
An attempt is still made to find the hostname in the resolver cache.
This commit is contained in:
Jordan Schidlowsky 2022-01-29 00:29:27 +01:00 committed by Fabio Alessandrelli
parent 3db1d689ce
commit 1ec96bc206
2 changed files with 56 additions and 21 deletions

View file

@ -63,10 +63,11 @@ private:
String _key;
String _host;
int _port;
Array ip_candidates;
uint16_t _port;
Array _ip_candidates;
Vector<String> _protocols;
bool _use_ssl = false;
IP::ResolverID _resolver_id = IP::RESOLVER_INVALID_ID;
void _do_handshake();
bool _verify_headers(String &r_protocol);