Fixed bug in Socket.isConnected()
Also added isConnectedToServer() to ClientHub.