inicializaEscucha method
Implementation
Future<void> inicializaEscucha({
required String idChannel,
required String token,
required String endpointSocket,
}) async {
try {
if (!_channels.containsKey(endpointSocket)) {
await _initSocket(token, endpointSocket);
}
WSocketDataProvider.logDebug(
'debugLogin _onInicializaEscucha...... $idChannel...$endpointSocket');
if (idChannel.isEmpty) {
throw 'El idChannel no puede estar vacio';
}
lstIdChannel[endpointSocket] ??= [];
lstIdChannel[endpointSocket]!.add(idChannel);
_sendJoinRoom(endpointSocket, idChannel);
} catch (error) {
WSocketDataProvider.logDebug('Error en inicializaEscucha: $error');
}
}