public IBinaryConnection Create(BinaryConnectionConfig config, IMessageValidator validator) { IBinaryConnection connection = null; if (config is TcpClientConfig) { connection = new TcpClientConnection(validator) { Logger = _logger } } ; if (config is TcpListenerConfig) { connection = new TcpListenerConnection(validator) { Logger = _logger } } ; connection?.Initialize(config); return(connection); }
public ServerReconnectingState(TcpListenerConnection context, StateMap stateMap) : base(context, stateMap, BinaryConnectionState.AttemptingConnection) { }
public ServerNotListeningState(TcpListenerConnection context, StateMap stateMap) : base(context, stateMap, BinaryConnectionState.Disconnected) { }