Things the protocol can do for us

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

Properties

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

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

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

Make an attempt to connect into this protocol

outbound: ((port: Remote<Port>, remoteAddr: string, connectionHandler: Remote<ConnectionHandler>) => PromiseVow<Connection>)

Create an outbound connection