コード例 #1
0
        public AsyncTcpSession(SessionBasedLink link, Socket socket)
            : base(link, socket)
        {
            recvEventArgs = new SocketAsyncEventArgs();
            sendEventArgs = new SocketAsyncEventArgs();

            recvEventArgs.Completed += OnReceiveCompleted;
            sendEventArgs.Completed += OnSendCompleted;
        }
コード例 #2
0
ファイル: LinkSession.cs プロジェクト: gitter-badger/x2clr
        /// <summary>
        /// Initializes a new instance of the LinkSession class.
        /// </summary>
        protected LinkSession(SessionBasedLink link)
        {
            handle = handlePool.Acquire();
            this.link = link;

            rxBuffer = new Buffer();
            rxBufferList = new List<ArraySegment<byte>>();
            txBufferList = new List<ArraySegment<byte>>();

            eventsSending = new List<Event>();
            eventsToSend = new List<Event>();
            buffersSending = new List<SendBuffer>();

            Diag = new Diagnostics(this);
        }
コード例 #3
0
ファイル: LinkSession.cs プロジェクト: jaykang920/x2clr
        /// <summary>
        /// Initializes a new instance of the LinkSession class.
        /// </summary>
        protected LinkSession(SessionBasedLink link)
        {
            this.link = link;

            rxBuffer = new Buffer();
            rxBufferList = new List<ArraySegment<byte>>();
            txBufferList = new List<ArraySegment<byte>>();

            eventsSending = new List<Event>();
            eventsToSend = new List<Event>();
            buffersSending = new List<SendBuffer>();
            buffersSent = new List<SendBuffer>();

            if (link.SessionRecoveryEnabled)
            {
                preConnectionQueue = new List<Event>();
            }

            Diag = new Diagnostics(this);
        }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the AbstractTcpSession class.
 /// </summary>
 protected AbstractTcpSession(SessionBasedLink link, Socket socket)
     : base(link)
 {
     this.socket = socket;
     remoteEndPoint = socket.RemoteEndPoint as IPEndPoint;
 }
コード例 #5
0
ファイル: TcpSession.cs プロジェクト: gitter-badger/x2clr
 public TcpSession(SessionBasedLink link, Socket socket)
     : base(link, socket)
 {
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the AbstractTcpSession class.
 /// </summary>
 protected AbstractTcpSession(SessionBasedLink link, Socket socket)
     : base(link)
 {
     this.socket = socket;
 }