示例#1
0
        public UvTcpConnection(ChannelFactory channelFactory, UvLoopHandle loop, UvTcpHandle handle)
        {
            _input  = channelFactory.CreateChannel();
            _output = channelFactory.CreateChannel();

            ProcessReads(handle);
            _sendingTask = ProcessWrites(loop, handle);
        }
示例#2
0
        public UvTcpConnection(UvTcpListener listener, UvTcpHandle handle)
        {
            _listener = listener;

            _input  = listener.ChannelFactory.CreateChannel();
            _output = listener.ChannelFactory.CreateChannel();

            ProcessReads(handle);
            _sendingTask = ProcessWrites(handle);
        }
示例#3
0
        public UvTcpConnection(UvThread thread, UvTcpHandle handle)
        {
            _thread = thread;
            _handle = handle;

            _input  = _thread.ChannelFactory.CreateChannel();
            _output = _thread.ChannelFactory.CreateChannel();

            ProcessReads();
            _sendingTask = ProcessWrites();
        }
示例#4
0
        internal RioTcpConnection(IntPtr socket, long connectionId, IntPtr requestQueue, RioThread rioThread, RegisteredIO rio)
        {
            _socket       = socket;
            _connectionId = connectionId;
            _rio          = rio;
            _rioThread    = rioThread;

            _input  = rioThread.ChannelFactory.CreateChannel();
            _output = rioThread.ChannelFactory.CreateChannel();

            _requestQueue = requestQueue;

            rioThread.Connections.TryAdd(connectionId, this);

            ProcessReceives();
            _sendTask = ProcessSends();
        }