registerConnection method
Registers a new connection with the manager
Implementation
void registerConnection(TransportConn connection) {
if (_connections.containsKey(connection)) {
return;
}
final stateController = StreamController<ConnectionStateChange>.broadcast();
_connections[connection] = ConnectionState.connecting;
_stateControllers[connection] = stateController;
_lastActivity[connection] = DateTime.now();
// Start monitoring the connection and set initial state
_monitorConnection(connection);
updateState(connection, ConnectionState.ready);
}