Skip to content

Commit

Permalink
close #41
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenbitbyte committed Feb 4, 2024
1 parent 007b6e9 commit c340e34
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/comms/isocket-comms.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@ const {Message, Routines} = require('@dataparty/crypto')

const AuthOp = require('./op/auth-op')
const RosShim = require('./ros-shim')
const IParty = require('../party/iparty')


/**
* @interface module:Comms.ISocketComms
* @link module:Comms
* @extends EventEmitter
*
* @param {string} session
* @param {module:Party.IParty} party
* @param {module:Dataparty_Crypto.IIdentityProps} remoteIdentity
* @param {boolean} discoverRemoteIdentity Set to true if ANY remote identity can connect. When set to `true` the remoteIdentity will be populated from the client.
*/

class ISocketComms extends EventEmitter {
constructor({session, uri, party, remoteIdentity, discoverRemoteIdentity}){
constructor({session, party, remoteIdentity, discoverRemoteIdentity}){
super()
this.uri = uri
this.session = session
Expand Down
3 changes: 3 additions & 0 deletions src/comms/peer-comms.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ function truncateString(str, num) {
* @extends {module:Comms.ISocketComms}
* @link module:Comms
*
*
* @param {boolean} host Set to `true` to make this peer act as the protocol host
* @param {Object} socket Already connected peer socket
*/
class PeerComms extends ISocketComms {
constructor({remoteIdentity, discoverRemoteIdentity, host, party, socket, ...options}){
Expand Down

0 comments on commit c340e34

Please sign in to comment.