onListen method
Implement stream subscription
Implementation
@override
StreamSubscription onListen() {
final webSocket = client;
if (webSocket == null) {
throw StateError('webSocket is null');
}
return webSocket.listen(onData, onError: onError, onDone: onDone);
}