Things the protocol can do for us

interface ProtocolImpl {
    bindPort: ((prefix) => PromiseVow<Remote<Port>>);
    inbound: ((listenAddr, remoteAddr) => PromiseVow<InboundAttempt>);
    outbound: ((port, remoteAddr, connectionHandler) => PromiseVow<Connection>);
}

Properties

bindPort: ((prefix) => PromiseVow<Remote<Port>>)

Claim a port, or if ending in ENDPOINT_SEPARATOR, a fresh name

Type declaration

    • (prefix): PromiseVow<Remote<Port>>
    • Parameters

      • prefix: string

      Returns PromiseVow<Remote<Port>>

inbound: ((listenAddr, remoteAddr) => PromiseVow<InboundAttempt>)

Make an attempt to connect into this protocol

Type declaration

outbound: ((port, remoteAddr, connectionHandler) => PromiseVow<Connection>)

Create an outbound connection

Type declaration