Search
Preparing search index...
The search index is not available
pinus
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
MQTTSocket
Class MQTTSocket
Socket class that wraps socket and websocket to provide unified interface for up level.
Hierarchy
EventEmitter
MQTTSocket
Implements
ISocket
Index
Constructors
constructor
Properties
adaptor
id
remote
Address
send
Raw
socket
state
default
Max
Listeners
Methods
add
Listener
disconnect
emit
event
Names
get
Max
Listeners
listener
Count
listeners
on
once
prepend
Listener
prepend
Once
Listener
remove
All
Listeners
remove
Listener
send
send
Batch
set
Max
Listeners
listener
Count
Constructors
constructor
new MQTTSocket
(
id
:
number
, socket
:
mqtt_connection
, adaptor
:
MqttAdaptor
)
:
MQTTSocket
Parameters
id:
number
socket:
mqtt_connection
adaptor:
MqttAdaptor
Returns
MQTTSocket
Properties
adaptor
adaptor
:
MqttAdaptor
id
id
:
number
remote
Address
remote
Address
:
object
Type declaration
ip
:
string
port
:
number
send
Raw
send
Raw
:
send
= this.send
socket
socket
:
mqtt_connection
state
state
:
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
disconnect
disconnect
(
)
:
void
Returns
void
emit
emit
(
event
:
string
|
symbol
,
...
args
:
any
[]
)
:
boolean
Parameters
event:
string
|
symbol
Rest
...
args:
any
[]
Returns
boolean
event
Names
event
Names
(
)
:
Array
<
string
|
symbol
>
Returns
Array
<
string
|
symbol
>
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
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
(
msg
:
any
)
:
void
Parameters
msg:
any
Returns
void
send
Batch
send
Batch
(
msgs
:
any
[]
)
:
void
Parameters
msgs:
any
[]
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
MQTTSocket
constructor
adaptor
id
remote
Address
send
Raw
socket
state
default
Max
Listeners
add
Listener
disconnect
emit
event
Names
get
Max
Listeners
listener
Count
listeners
on
once
prepend
Listener
prepend
Once
Listener
remove
All
Listeners
remove
Listener
send
send
Batch
set
Max
Listeners
listener
Count
Socket class that wraps socket and websocket to provide unified interface for up level.