CLOSING A SOCKET
•Close the remote host connection and releases all managed and unmanaged resources associated with the socket.
Shutdown()
•To close a socket first call Shutdown() of Socket object .
•Shutdown() finalizes any pending operation on the socket and then signals the remote host at the end-point that the connection should be closed
close()
•The close() to close connection
If(s.Connected)
{
s. Shutdown() ;
s.Close();
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment