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
| Name | Type |
|---|---|
prefix | string |
Returns
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
| Name | Type |
|---|---|
listenAddr | string |
remoteAddr | string |
Returns
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
| Name | Type |
|---|---|
port | Remote<Port> |
remoteAddr | string |
connectionHandler | Remote<ConnectionHandler> |