Ejemplo n.º 1
0
        public AsyncTcpSession(SessionBasedLink link, Socket socket)
            : base(link, socket)
        {
            rxEventArgs = new SocketAsyncEventArgs();
            txEventArgs = new SocketAsyncEventArgs();

            rxEventArgs.Completed += OnReceiveCompleted;
            txEventArgs.Completed += OnSendCompleted;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the LinkSession class.
        /// </summary>
        protected LinkSession(SessionBasedLink link)
        {
            this.link = link;

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

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

            Diag = new Diagnostics(this);
        }
Ejemplo n.º 3
0
 public TcpSession(SessionBasedLink link, Socket socket)
     : base(link, socket)
 {
 }
Ejemplo n.º 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;
 }