Terminate the connection with a server.
A value of zero is returned if the connection was terminated
successfully. Otherwise, a non-zero error code is returned which
indicates the cause of the failure.
This method terminates the network connection with the server.