Ejemplo n.º 1
0
 internal override void Establish(int timeout)
 {
     CheckDisposed();
     try
     {
         _listenSocket.AcceptTimeout = timeout;
         _socket = _listenSocket.Accept();
         _stream = new NetworkStreamEx(_socket);
     }
     catch (SocketException e)
     {
         CheckDisposed();
         CheckTimeoutException(e);
         throw;
     }
     catch
     {
         CheckDisposed();
         throw;
     }
 }