Search
Preparing search index...
The search index is not available
pinus
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
UdpSocket
Class UdpSocket
Hierarchy
internal
UdpSocket
Implements
ISocket
Index
Modules
internal
Constructors
constructor
Properties
host
id
peer
port
remote
Address
socket
state
Methods
add
Listener
disconnect
emit
event
Names
get
Max
Listeners
handshake
Response
listener
Count
listeners
on
once
prepend
Listener
prepend
Once
Listener
remove
All
Listeners
remove
Listener
send
send
Batch
send
Force
send
Raw
set
Max
Listeners
Constructors
constructor
new
Udp
Socket
(
id
:
number
, socket
:
Socket
, peer
:
RemoteInfo
)
:
UdpSocket
Parameters
id:
number
socket:
Socket
peer:
RemoteInfo
Returns
UdpSocket
Properties
host
host
:
string
id
id
:
number
peer
peer
:
RemoteInfo
port
port
:
number
remote
Address
remote
Address
:
object
Type declaration
ip
:
string
port
:
number
socket
socket
:
Socket
state
state
:
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
handshake
Response
handshake
Response
(
resp
:
any
)
:
void
Parameters
resp:
any
Returns
void
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
Send byte data package to client.
Parameters
msg:
any
byte data
Returns
void
send
Batch
send
Batch
(
msgs
:
any
[]
)
:
void
Parameters
msgs:
any
[]
Returns
void
send
Force
send
Force
(
msg
:
any
)
:
void
Parameters
msg:
any
Returns
void
send
Raw
send
Raw
(
msg
:
any
)
:
void
Parameters
msg:
any
Returns
void
set
Max
Listeners
set
Max
Listeners
(
n
:
number
)
:
this
Parameters
n:
number
Returns
this
Globals
Udp
Socket
constructor
host
id
peer
port
remote
Address
socket
state
add
Listener
disconnect
emit
event
Names
get
Max
Listeners
handshake
Response
listener
Count
listeners
on
once
prepend
Listener
prepend
Once
Listener
remove
All
Listeners
remove
Listener
send
send
Batch
send
Force
send
Raw
set
Max
Listeners
Send byte data package to client.