public RawSocketConnection(SocketData connection, IWampStreamingMessageParser <TMessage> parser, TimeSpan?autoPingInterval) { mParser = parser; mConnection = connection.ConnectionContext; mMaxAllowedMessageSize = connection.Handshake.MaxMessageSizeInBytes; mPinger = new Pinger(this); mPingPongHandler = new PingPongHandler(mLogger, mPinger, autoPingInterval); }
public FleckWampConnection(IWebSocketConnection webSocketConnection, ICookieAuthenticatorFactory cookieAuthenticatorFactory, TimeSpan?autoSendPingInterval = null) : base(new FleckCookieProvider(webSocketConnection.ConnectionInfo), cookieAuthenticatorFactory) { mWebSocketConnection = webSocketConnection; mPingPongHandler = new PingPongHandler(mLogger, new FleckPinger(webSocketConnection), autoSendPingInterval ?? TimeSpan.FromSeconds(45)); mWebSocketConnection.OnOpen = OnConnectionOpen; mWebSocketConnection.OnError = OnConnectionError; mWebSocketConnection.OnClose = OnConnectionClose; mTransportDetails = new FleckTransportDetails(mWebSocketConnection.ConnectionInfo); }
public TcpClientConnection (TcpClient client, long maxAllowedMessageSize, Handshake handshake, IWampStreamingMessageParser <TMessage> binding, ArrayPool <byte> byteArrayPool, TimeSpan?autoPingInterval) { mTcpClient = client; mMaxAllowedMessageSize = maxAllowedMessageSize; mHandshake = handshake; mBinding = binding; mByteArrayPool = byteArrayPool; mPinger = new Pinger(this); mPingPongHandler = new PingPongHandler(mLogger, mPinger, autoPingInterval); }
public TcpClientConnection (TcpClient client, long maxAllowedMessageSize, Handshake handshake, IWampStreamingMessageParser <TMessage> binding, RecyclableMemoryStreamManager memoryStreamManager, TimeSpan?autoPingInterval) { mTcpClient = client; mMaxAllowedMessageSize = maxAllowedMessageSize; mHandshake = handshake; mBinding = binding; mMemoryStreamManager = memoryStreamManager; mPinger = new Pinger(this); mPingPongHandler = new PingPongHandler(mLogger, mPinger, autoPingInterval); }