protected BaseWebsocket(IWebSocket socket, string connectionId) { Logger = LoggerFetcher.GetLogger(connectionId, this); Socket = socket; }
public FayeClient(IWebSocket socket, string connectionId = "standard") : base(messageCounter: FIRST_MESSAGE_INDEX) { _connectionId = connectionId; _transportClient = new WebsocketTransportClient(socket, connectionId); _advice = DefaultAdvice; _transportConnection = null; _logger = LoggerFetcher.GetLogger(connectionId, this); }
// internal to only allow FayeClient to instantiate this class internal FayeConnection(ITransportConnection connection, HandshakeResponseMessage handshakeResponse, int messageCounter, Advice advice, TimeSpan handshakeTimeout, string connectionId) : base(messageCounter: messageCounter, handshakeTimeout: handshakeTimeout) { _connection = connection; ClientId = handshakeResponse.ClientId; _connection.MessageReceived += SocketMessageReceived; _subscribedChannels = new Dictionary <string, List <Action <string> > >(); _synchronousMessageEvents = new Dictionary <int, TaskCompletionSource <MessageReceivedArgs> >(); _advice = advice; _connection.ConnectionLost += SocketConnectionLost; _connection.ConnectionReestablished += SocketConnectionReestablished; _logger = LoggerFetcher.GetLogger(connectionId, this); }