connect method
Implementation
Future<void> connect(String id, Channel channel) async {
final ioChannel =
IOWebSocketChannel.connect(channel.uri, headers: _getHeaders(channel));
channel.client = ioChannel.innerWebSocket;
channel.initialize();
if (channel.client != null) {
channel.handler.onConnect(channel.client!);
}
_channels.putIfAbsent(id, () => channel);
}