Open an outgoing stream to a connected agent on the given protocol.
Throws if the agent is not connected.
Return the AgentIds of all currently connected peers.
Attach a module to this node.
Calls module.init(this) to wire it up, then module.start() if defined. Multiple modules can be registered.
Register a handler for incoming streams on the given protocol.
Called once per incoming stream, after the access check has passed.
Interface that the peerkit node exposes to modules
Modules depend on this interface only, so that they can be distributed without a dependency on the peerkit package.