Org.Mentalis.Security.Ssl.SecureSocket.BeginShutdown C# (CSharp) Метод

BeginShutdown() публичный Метод

Begins an asynchronous request to shut the connection down.
has already been called.
public BeginShutdown ( AsyncCallback callback, object state ) : IAsyncResult
callback AsyncCallback The delegate.
state object An object containing state information for this request.
Результат IAsyncResult
		public IAsyncResult BeginShutdown(AsyncCallback callback, object state) {
			if (m_ShutdownResult != null)
				throw new InvalidOperationException();
			AsyncResult ar = new AsyncResult(callback, state, null);
			m_ShutdownResult = ar;
			if (!this.Connected) {
				ar.Notify(null);
			} else if (SecureProtocol == SecureProtocol.None) {
				base.Shutdown(SocketShutdown.Both);
				ar.Notify(null);
			} else {
				m_Controller.BeginShutdown(new AsyncCallback(this.OnShutdown), null);
			}
			return ar;
		}
		/// <summary>