Exemplo n.º 1
0
        /// <summary>
        /// Accepts a pending connection request and returns underlying network transport
        /// </summary>
        public ITransport Accept()
        {
            // check object state
            if (_disposed)
            {
                throw new ObjectDisposedException(GetType().FullName);
            }
            if (_transport == null)
            {
                throw new InvalidOperationException("Listener was stopped");
            }

            return(_transport.Accept());
        }
Exemplo n.º 2
0
 private void Accept(object state)
 {
     lock (_result)
     {
         try
         {
             _acceptedConnection = _transport.Accept();
         }
         catch (Exception ex)
         {
             _transportException = ex;
         }
         End();
     }
 }
Exemplo n.º 3
0
 public ITransport Accept()
 {
     return(GetWrapper(_transport.Accept()));
 }