Exemplo n.º 1
0
        public AsyncTcpLinkSession(SocketLink link, Socket socket)
            : base(link, socket)
        {
            syncRoot = new Object();

            recvEventArgs = new SocketAsyncEventArgs();
            sendEventArgs = new SocketAsyncEventArgs();

            recvEventArgs.Completed += OnReceiveCompleted;
            sendEventArgs.Completed += OnSendCompleted;
        }
Exemplo n.º 2
0
        protected Socket socket; // underlying socket

        #endregion Fields

        #region Constructors

        protected SocketLinkSession(SocketLink link, Socket socket)
            : base(socket.Handle)
        {
            this.link = link;
            this.socket = socket;

            sendQueue = new Queue<Event>();

            recvBuffer = new Buffer(12);
            sendBuffer = new Buffer(12);

            recvBufferList = new List<ArraySegment<byte>>();
            sendBufferList = new List<ArraySegment<byte>>();

            Diag = new Diagnostics(this);
        }
Exemplo n.º 3
0
 public TcpLinkSession(SocketLink link, Socket socket)
     : base(link, socket)
 {
     syncRoot = new Object();
 }