コード例 #1
0
ファイル: UvTcpConnection.cs プロジェクト: ericl85/Channels
        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
ファイル: RioTcpConnection.cs プロジェクト: ericl85/Channels
        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();
        }