@@ -301,5 +301,13 @@ Peer.prototype.disconnect = function() {
}
};
+/**
+ * Provides a clean method for checking if there's an active connection to the
+ * peer server.
+ */
+Peer.prototype.isConnected = function() {
+ return (!this.disconnected);
+}
+
exports.Peer = Peer;