Skip to content

API documentation of Agoric SDK / Exports / @agoric/network / types / ProtocolImpl

Interface: ProtocolImpl

@agoric/network.types.ProtocolImpl

Things the protocol can do for us

Table of contents

Properties

Properties

bind

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

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

Type declaration

▸ (prefix): PromiseVow<Remote<Port>>

Parameters
NameType
prefixstring
Returns

PromiseVow<Remote<Port>>

Defined in

packages/network/src/types.js:185


inbound

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

Make an attempt to connect into this protocol

Type declaration

▸ (listenAddr, remoteAddr): PromiseVow<InboundAttempt>

Parameters
NameType
listenAddrstring
remoteAddrstring
Returns

PromiseVow<InboundAttempt>

Defined in

packages/network/src/types.js:190


outbound

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

Create an outbound connection

Type declaration

▸ (port, remoteAddr, connectionHandler): PromiseVow<Connection>

Parameters
NameType
portRemote<Port>
remoteAddrstring
connectionHandlerRemote<ConnectionHandler>
Returns

PromiseVow<Connection>

Defined in

packages/network/src/types.js:196