Enumeration of events for the Socket object.

Static variables

@:value(cast "close")@:impl@:enumstaticinlineread onlyClose:SocketEvent<() ‑> Void> = "close"

Emitted when a socket is closed with close. No new message events will be emitted on this socket.

@:value(cast "error")@:impl@:enumstaticinlineread onlyError:SocketEvent<Error ‑> Void> = "error"

Emitted when an error occurs.

@:value(cast "listening")@:impl@:enumstaticinlineread onlyListening:SocketEvent<() ‑> Void> = "listening"

Emitted when a socket starts listening for datagrams. This happens as soon as UDP sockets are created.

@:value(cast "message")@:impl@:enumstaticinlineread 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