Search
Preparing search index...
The search index is not available
pinus-rpc
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
WSMailBox
Class WSMailBox
Hierarchy
EventEmitter
WSMailBox
Index
Constructors
constructor
Properties
_interval
buffer
Msg
closed
connected
cur
Id
host
id
interval
opts
port
queue
requests
socket
timeout
timeout
Value
default
Max
Listeners
Methods
add
Listener
clear
CbTimeout
close
connect
emit
enqueue
event
Names
flush
get
Max
Listeners
listener
Count
listeners
on
once
prepend
Listener
prepend
Once
Listener
process
Msg
process
Msgs
remove
All
Listeners
remove
Listener
send
set
CbTimeout
set
Max
Listeners
listener
Count
Constructors
constructor
new WSMail
Box
(
server
:
object
, opts
:
MailBoxOpts
)
:
WSMailBox
Parameters
server:
object
host
:
Function
id
:
number
port
:
string
opts:
MailBoxOpts
Returns
WSMailBox
Properties
_interval
_interval
:
any
buffer
Msg
buffer
Msg
:
any
closed
closed
:
boolean
= false
connected
connected
:
boolean
= false
cur
Id
cur
Id
:
number
= 0
host
host
:
Function
id
id
:
number
interval
interval
:
number
opts
opts
:
any
port
port
:
string
queue
queue
:
Array
<
any
>
= []
requests
requests
:
object
Type declaration
[
key:
string
]:
any
socket
socket
:
any
timeout
timeout
:
object
Type declaration
[
key:
string
]:
any
timeout
Value
timeout
Value
:
number
Static
default
Max
Listeners
default
Max
Listeners
:
number
Methods
add
Listener
add
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
clear
CbTimeout
clear
CbTimeout
(
mailbox
:
WSMailBox
, id
:
number
)
:
void
Parameters
mailbox:
WSMailBox
id:
number
Returns
void
close
close
(
)
:
void
Returns
void
connect
connect
(
tracer
:
Tracer
, cb
:
function
)
:
void
Parameters
tracer:
Tracer
cb:
function
(
parameters
?:
Error
)
:
void
Parameters
Optional
parameters:
Error
Returns
void
Returns
void
emit
emit
(
event
:
string
|
symbol
,
...
args
:
any
[]
)
:
boolean
Parameters
event:
string
|
symbol
Rest
...
args:
any
[]
Returns
boolean
enqueue
enqueue
(
mailbox
:
WSMailBox
, msg
:
Msg
)
:
void
Parameters
mailbox:
WSMailBox
msg:
Msg
Returns
void
event
Names
event
Names
(
)
:
Array
<
string
|
symbol
>
Returns
Array
<
string
|
symbol
>
flush
flush
(
mailbox
:
WSMailBox
)
:
void
Parameters
mailbox:
WSMailBox
Returns
void
get
Max
Listeners
get
Max
Listeners
(
)
:
number
Returns
number
listener
Count
listener
Count
(
type
:
string
|
symbol
)
:
number
Parameters
type:
string
|
symbol
Returns
number
listeners
listeners
(
event
:
string
|
symbol
)
:
Function
[]
Parameters
event:
string
|
symbol
Returns
Function
[]
on
on
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
once
once
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
prepend
Listener
prepend
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
prepend
Once
Listener
prepend
Once
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
process
Msg
process
Msg
(
mailbox
:
WSMailBox
, pkg
:
MailBoxPkg
)
:
void
Parameters
mailbox:
WSMailBox
pkg:
MailBoxPkg
Returns
void
process
Msgs
process
Msgs
(
mailbox
:
WSMailBox
, pkgs
:
Array
<
MailBoxPkg
>
)
:
void
Parameters
mailbox:
WSMailBox
pkgs:
Array
<
MailBoxPkg
>
Returns
void
remove
All
Listeners
remove
All
Listeners
(
event
?:
string
|
symbol
)
:
this
Parameters
Optional
event:
string
|
symbol
Returns
this
remove
Listener
remove
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
send
send
(
tracer
:
Tracer
, msg
:
Msg
, opts
:
MailBoxOpts
, cb
:
function
)
:
void
send message to remote server
Parameters
tracer:
Tracer
msg:
Msg
opts:
MailBoxOpts
attach info to send method
cb:
function
declaration decided by remote interface
(
tracer
:
Tracer
, msg
?:
any
, cb
?:
Function
)
:
void
Parameters
tracer:
Tracer
Optional
msg:
any
Optional
cb:
Function
Returns
void
Returns
void
set
CbTimeout
set
CbTimeout
(
mailbox
:
WSMailBox
, id
:
number
, tracer
:
Tracer
, cb
:
function
)
:
void
Parameters
mailbox:
WSMailBox
id:
number
tracer:
Tracer
cb:
function
(
tracer
:
Tracer
, msg
?:
any
, cb
?:
Function
)
:
void
Parameters
tracer:
Tracer
Optional
msg:
any
Optional
cb:
Function
Returns
void
Returns
void
set
Max
Listeners
set
Max
Listeners
(
n
:
number
)
:
this
Parameters
n:
number
Returns
this
Static
listener
Count
listener
Count
(
emitter
:
EventEmitter
, event
:
string
|
symbol
)
:
number
Parameters
emitter:
EventEmitter
event:
string
|
symbol
Returns
number
Globals
WSMail
Box
constructor
_interval
buffer
Msg
closed
connected
cur
Id
host
id
interval
opts
port
queue
requests
socket
timeout
timeout
Value
default
Max
Listeners
add
Listener
clear
CbTimeout
close
connect
emit
enqueue
event
Names
flush
get
Max
Listeners
listener
Count
listeners
on
once
prepend
Listener
prepend
Once
Listener
process
Msg
process
Msgs
remove
All
Listeners
remove
Listener
send
set
CbTimeout
set
Max
Listeners
listener
Count
send message to remote server