Org.Mentalis.Security.Ssl.SecureSocket.EndShutdown C# (CSharp) Method

EndShutdown() public method

Ends an asynchronous request to shut the connection down.
is a null reference (Nothing in Visual Basic). has not been called first. has not been returned by a call to .
public EndShutdown ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult An that references the asynchronous shutdown.
return void
		public void EndShutdown(IAsyncResult asyncResult) {
			if (asyncResult == null)
				throw new ArgumentNullException();
			if (m_ShutdownResult == null)
				throw new InvalidOperationException();
			if (asyncResult != m_ShutdownResult)
				throw new ArgumentException();
			// Process the EndSecureShutdown
			// block if the operation hasn't ended yet
			AsyncResult ar = m_ShutdownResult;
			while (!ar.IsCompleted) {
				ar.AsyncWaitHandle.WaitOne(200, false);
			}
			m_ShutdownResult = null;
			//if (ar.AsyncException != null)  // eat exceptions; they're not really important
			//	throw ar.AsyncException;
		}
		/// <summary>