Example #1
0
        public TcpConnection(EndPoint endPoint)
        {
            _socket   = new Socket(SocketType.Stream, ProtocolType.Tcp);
            _endPoint = endPoint;

            _sender   = new SocketSender(_socket, PipeScheduler.ThreadPool);
            _receiver = new SocketReceiver(_socket, PipeScheduler.ThreadPool);
        }
Example #2
0
        public TcpConnection(EndPoint endPoint)
        {
            _socket   = new Socket(SocketType.Stream, ProtocolType.Tcp);
            _endPoint = endPoint;

            _sender   = new SocketSender(_socket, PipeScheduler.ThreadPool);
            _receiver = new SocketReceiver(_socket, PipeScheduler.ThreadPool);

            // Add IConnectionInherentKeepAliveFeature to the tcp connection impl since Kestrel doesn't implement
            // the IConnectionHeartbeatFeature
            Features.Set <IConnectionInherentKeepAliveFeature>(this);
        }