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

Shutdown() public method

Shuts down the secure connection.
SecureSocket has been closed. An operating system error occurs while accessing the SecureSocket. An error occurs while shutting the secure connection down.
public Shutdown ( SocketShutdown how ) : void
how SocketShutdown
return void
		public override void Shutdown(SocketShutdown how) {
			this.EndShutdown(this.BeginShutdown(null, null));
		}
		/// <summary>

Usage Example

 /// <summary>
 /// Closes the stream and optionally closes the underlying <see cref="SecureSocket"/>.
 /// </summary>
 /// <remarks>
 /// The Close method frees resources used by the SecureNetworkStream instance and, if the SecureNetworkStream owns the underlying socket, closes the underlying socket.
 /// </remarks>
 public override void Close()
 {
     if (m_OwnsSocket)
     {
         try {
             Socket.Shutdown(SocketShutdown.Both);
         } catch {
         } finally {
             Socket.Close();
         }
     }
 }
All Usage Examples Of Org.Mentalis.Security.Ssl.SecureSocket::Shutdown