Docs
Reference
Guides
Blog
Discord
/
Bun
/
udp
/
SocketHandler
/
error
M
error
Search the reference...
/
Docs
Reference
Guides
Blog
Discord
/
Bun
/
udp
/
SocketHandler
/
error
M
error
method
udp.SocketHandler.error
error
(
socket
:
Socket
<
DataBinaryType
>
,
error
:
Error
)
:
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
;
interface
Error
cause
?
:
unknown
The cause of the error.
message
:
string
name
:
string
stack
?
:
string