Permalink
Browse files

added api docs for getters

  • Loading branch information...
1 parent 30a50d0 commit 079b01a4778bd706dca75942cec3ba58c159a8b4 @michelle michelle committed Apr 3, 2013
Showing with 28 additions and 3 deletions.
  1. +28 −3 docs/api.md
View
31 docs/api.md
@@ -118,23 +118,48 @@ There is no constructor. A `DataConnection` object must be obtained in the callb
### EXPERIMENTAL reliable and large file transfer:
Simply pass in `reliable: true` when calling `.connect(...)`. This module is experimental, temporary, and exists here: https://github.com/michellebu/reliable
-
-### connection.id
-The id of the local peer that this connection belongs to.
+### connection.getPeer()
+
+The id of the remote peer this connection is connected to.
+
+### connection.isOpen()
+
+Whether the connection is open (ready for read and write).
+
+### connection.getMetadata()
+
+The metadata passed in when the connection was created with `peer.connect(...)`.
+
+### connection.getLabel()
+
+The optional label passed in when the connection was created with `peer.connect(...)`.
+
### connection.peer
+**Deprecated. Use the getter instead.**
+
The id of the remote peer this connection is connected to.
### connection.open
+**Deprecated. Use the getter instead.**
+
Whether the connection is open (ready for read and write).
### connection.metadata
+**Deprecated. Use the getter instead.**
+
The metadata passed in when the connection was created with `peer.connect(...)`.
+### connection.label
+
+**Deprecated. Use the getter instead.**
+
+The optional label passed in when the connection was created with `peer.connect(...)`.
+
### connection.serialization
The serialization format of the connection. Can be `binary`, `binary-utf8`, `json`, or `none`

0 comments on commit 079b01a

Please sign in to comment.