API documentation of Agoric SDK / Exports / @agoric/network / types / ListenHandler
Interface: ListenHandler
@agoric/network.types.ListenHandler
A handler for incoming connections
Table of contents
Properties
Properties
onAccept
• onAccept: (port
: Remote
<Port
>, localAddr
: string
, remoteAddr
: string
, l
: Remote
<ListenHandler
>) => PromiseVow
<Remote
<ConnectionHandler
>>
A new connection is incoming
Type declaration
▸ (port
, localAddr
, remoteAddr
, l
): PromiseVow
<Remote
<ConnectionHandler
>>
Parameters
Name | Type |
---|---|
port | Remote <Port > |
localAddr | string |
remoteAddr | string |
l | Remote <ListenHandler > |
Returns
PromiseVow
<Remote
<ConnectionHandler
>>
Defined in
packages/network/src/types.js:65
onError
• onError: undefined
| (port
: Remote
<Port
>, rej
: any
, l
: Remote
<ListenHandler
>) => PromiseVow
<void
>
There was an error while listening
Defined in
packages/network/src/types.js:74
onListen
• onListen: undefined
| (port
: Remote
<Port
>, l
: Remote
<ListenHandler
>) => PromiseVow
<void
>
The listener has been registered
Defined in
packages/network/src/types.js:59
onReject
• onReject: undefined
| (port
: Remote
<Port
>, localAddr
: string
, remoteAddr
: string
, l
: Remote
<ListenHandler
>) => PromiseVow
<void
>
The connection was rejected
Defined in
packages/network/src/types.js:72
onRemove
• onRemove: undefined
| (port
: Remote
<Port
>, l
: Remote
<ListenHandler
>) => PromiseVow
<void
>
The listener has been removed