added method Peer.isConnected()