fail method
Ends the connection with error (e.g. a network failure).
Implementation
void fail(WebSocketException error) {
if (_ended) return;
_end(() => _listener.onClosed(null, '', error));
}
Ends the connection with error (e.g. a network failure).
void fail(WebSocketException error) {
if (_ended) return;
_end(() => _listener.onClosed(null, '', error));
}