|
@@ -118,23 +118,48 @@ There is no constructor. A `DataConnection` object must be obtained in the callb
|
|
### EXPERIMENTAL reliable and large file transfer:
|
|
### 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
|
|
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
|
|
### connection.peer
|
|
|
|
|
|
|
|
+**Deprecated. Use the getter instead.**
|
|
|
|
+
|
|
The id of the remote peer this connection is connected to.
|
|
The id of the remote peer this connection is connected to.
|
|
|
|
|
|
### connection.open
|
|
### connection.open
|
|
|
|
|
|
|
|
+**Deprecated. Use the getter instead.**
|
|
|
|
+
|
|
Whether the connection is open (ready for read and write).
|
|
Whether the connection is open (ready for read and write).
|
|
|
|
|
|
### connection.metadata
|
|
### connection.metadata
|
|
|
|
|
|
|
|
+**Deprecated. Use the getter instead.**
|
|
|
|
+
|
|
The metadata passed in when the connection was created with `peer.connect(...)`.
|
|
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
|
|
### connection.serialization
|
|
|
|
|
|
The serialization format of the connection. Can be `binary`, `binary-utf8`, `json`, or `none`
|
|
The serialization format of the connection. Can be `binary`, `binary-utf8`, `json`, or `none`
|