Check whether the socket is connected.
This is only useful for connection-oriented sockets.
a Socket.
true if socket is connected, false otherwise.