Docs
Reference
Guides
Blog
Discord
/
Bun
/
udp
/
SocketHandler
/
data
M
data
Search the reference...
/
Docs
Reference
Guides
Blog
Discord
/
Bun
/
udp
/
SocketHandler
/
data
M
data
method
udp.SocketHandler.data
data
(
socket
:
Socket
<
DataBinaryType
>
,
data
:
BinaryTypeList
[
DataBinaryType
]
,
port
:
number
,
address
:
string
)
:
void
|
Promise
<
void
>
;
Referenced types
interface
Socket
<
DataBinaryType
extends
BinaryType
>
readonly
address
:
SocketAddress
readonly
binaryType
:
keyof
BinaryTypeList
readonly
closed
:
boolean
readonly
hostname
:
string
readonly
port
:
number
close
()
:
void
;
ref
()
:
void
;
reload
(
handler
:
SocketHandler
<
DataBinaryType
>
)
:
void
;
send
(
data
:
Data
,
port
:
number
,
address
:
string
)
:
boolean
;
sendMany
(
packets
:
readonly
number
|
Data
[]
)
:
number
;
unref
()
:
void
;