Skip to content

Commit c340e34

Browse files
committed
close #41
1 parent 007b6e9 commit c340e34

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/comms/isocket-comms.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,22 @@ const {Message, Routines} = require('@dataparty/crypto')
77

88
const AuthOp = require('./op/auth-op')
99
const RosShim = require('./ros-shim')
10+
const IParty = require('../party/iparty')
1011

1112

1213
/**
1314
* @interface module:Comms.ISocketComms
1415
* @link module:Comms
1516
* @extends EventEmitter
17+
*
18+
* @param {string} session
19+
* @param {module:Party.IParty} party
20+
* @param {module:Dataparty_Crypto.IIdentityProps} remoteIdentity
21+
* @param {boolean} discoverRemoteIdentity Set to true if ANY remote identity can connect. When set to `true` the remoteIdentity will be populated from the client.
1622
*/
1723

1824
class ISocketComms extends EventEmitter {
19-
constructor({session, uri, party, remoteIdentity, discoverRemoteIdentity}){
25+
constructor({session, party, remoteIdentity, discoverRemoteIdentity}){
2026
super()
2127
this.uri = uri
2228
this.session = session

src/comms/peer-comms.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ function truncateString(str, num) {
4242
* @extends {module:Comms.ISocketComms}
4343
* @link module:Comms
4444
*
45+
*
46+
* @param {boolean} host Set to `true` to make this peer act as the protocol host
47+
* @param {Object} socket Already connected peer socket
4548
*/
4649
class PeerComms extends ISocketComms {
4750
constructor({remoteIdentity, discoverRemoteIdentity, host, party, socket, ...options}){

0 commit comments

Comments
 (0)