Permalink
Browse files

docs update

  • Loading branch information...
1 parent f795232 commit 254e3bec8bd50f0980b5fc65c53c8cdc1968bc2c @michelle michelle committed Mar 30, 2013
Showing with 10 additions and 2 deletions.
  1. +10 −2 docs/api.md
View
@@ -54,7 +54,15 @@ Before writing to / data will be emitted from the `DataConnection` object that i
### peer.destroy()
-Close the server and terminate all connections.
+Close the connection to the server and terminate all connections.
+
+**Warning: This cannot be undone; the respective peer object will no longer be able to create or receive any connections and its ID will be forfeited on the (cloud) server.**
+
+### peer.disconnect()
+
+Close the connection to the server, leaving all existing DataConnections intact.
+
+**Warning: This cannot be undone; the respective peer object will no longer be able to create or receive any connections and its ID will be forfeited on the (cloud) server.**
### Event: 'connection'
@@ -91,7 +99,7 @@ The `error` object also has a `type` parameter that may be helpful in responding
* `socket-error`: An error from the underlying socket.
* `socket-closed`: The underlying socket closed unexpectedly.
* (The Peer object is destroyed after one of the errors above are emitted.)
-* `peer-destroyed`: A Peer that has been destroyed is being used to try to connect.
+* `peer-disconnected`: A Peer that has been disconnected is being used to try to connect.
### Event: 'close'

0 comments on commit 254e3be

Please sign in to comment.