connectWs method
dynamic
connectWs()
Implementation
connectWs() async {
try {
return await WebSocket.connect(wsUrl, headers: headers);
} catch (e) {
print("Error! can not connect WS connectWs " + e.toString());
await Future.delayed(const Duration(milliseconds: 10000));
return await connectWs();
}
}