How to use the multistream-select.Select function in multistream-select

To help you get started, we’ve selected a few multistream-select examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github libp2p / js-libp2p-switch / src / swarm.js View on Github external
function userProtocolMuxer (conn) {
    var msS = new multistream.Select()
    msS.handle(conn)
    Object.keys(self.protocols).forEach(function (protocol) {
      msS.addHandler(protocol, self.protocols[protocol])
    })
  }
}

multistream-select

JavaScript implementation of multistream-select

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis