API documentation of Agoric SDK / Exports / @agoric/network / types / Port
Interface: Port
@agoric/network.types.Port
A port that has been bound to a protocol
Table of contents
Properties
Properties
addListener
• addListener: (acceptHandler
: Remote
<ListenHandler
>) => PromiseVow
<void
>
Begin accepting incoming connections
Type declaration
▸ (acceptHandler
): PromiseVow
<void
>
Parameters
Name | Type |
---|---|
acceptHandler | Remote <ListenHandler > |
Returns
PromiseVow
<void
>
Defined in
packages/network/src/types.js:44
connect
• connect: (remote
: string
, connectionHandler?
: Remote
<ConnectionHandler
>) => PromiseVow
<Connection
>
Make an outbound connection
Type declaration
▸ (remote
, connectionHandler?
): PromiseVow
<Connection
>
Parameters
Name | Type |
---|---|
remote | string |
connectionHandler? | Remote <ConnectionHandler > |
Returns
Defined in
packages/network/src/types.js:49
getLocalAddress
• getLocalAddress: () => string
Get the locally bound name of this port
Type declaration
▸ (): string
Returns
string
Defined in
packages/network/src/types.js:42
removeListener
• removeListener: (acceptHandler
: Remote
<ListenHandler
>) => PromiseVow
<void
>
Remove the currently-bound listener
Type declaration
▸ (acceptHandler
): PromiseVow
<void
>
Parameters
Name | Type |
---|---|
acceptHandler | Remote <ListenHandler > |
Returns
PromiseVow
<void
>
Defined in
packages/network/src/types.js:51
revoke
• revoke: () => PromiseVow
<void
>
Deallocate the port entirely, removing all listeners and closing all active connections
Type declaration
▸ (): PromiseVow
<void
>
Returns
PromiseVow
<void
>