Implement Socket.isConnected().