Disables sends and receives on a VirtualSocket.
[Visual Basic]
Overridable Public Sub Shutdown( _
ByVal how As SocketShutdown _
)
Setting how to Send, specifies that subsequent calls to Send are not allowed. With TCP sockets, a FIN will be sent after all data is sent and acknowledged by the receiver.
Setting how to Receive, specifies that subsequent calls to Receive are not allowed. This has no effect on lower protocol layers. For TCP sockets, the connection is reset if data is waiting to be received or if more data arrives after the Socket is disabled. For UDP sockets, datagrams are accepted and queued.
Setting how to Both disables both sends and receives as described above.
To finish closing the Socket, a call to Close must be made after the call to Shutdown. You should not attempt to reuse the Socket.
Exception Type | Condition |
---|---|
SocketException | An error occurs while closing the VirtualSocket. |
ObjectDisposedException | The VirtualSocket has been closed. |
VirtualSocket Class | VirtualSocket Members | Org.Mentalis.Security.Ssl Namespace