Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }