View source
enum abstract SocketEvent<T>(Event<T>)
package js.node.dgram
to Event<T>
import js.node.dgram.Socket
Enumeration of events for the Socket
object.
Variables
inlineread onlyClose:SocketEvent<() ‑> Void> = "close"
Emitted when a socket is closed with close
.
No new message events will be emitted on this socket.
inlineread onlyListening:SocketEvent<() ‑> Void> = "listening"
Emitted when a socket starts listening for datagrams. This happens as soon as UDP sockets are created.
inlineread onlyMessage:SocketEvent<MessageListener> = "message"
Emitted when a new datagram is available on a socket. Listener arguments:
msg - received data
rinfo - sender's address information and the number of bytes in the datagram