Create an unbound UDP socket with asynchronous blocking semantics by default.
ProtectedblockingProtected OptionaldetachRemove event listeners from the current transport.
ProtectedepochProtected OptionalfailureProtected OptionaltransportUnderlying UDP socket handle.
Static ReadonlyAnyLet the system assign an available port when binding.
Static ReadonlyMaxMaximum UDP datagram payload size in bytes allowed by this implementation.
Static ReadonlyStatusSocket operation status enumeration.
Static ReadonlyTypeSocket transport protocol enumeration.
ProtectedallocateAllocate an unconnected transport by protocol; listeners may override this to use a Node Server.
addressTypeProtectedawaitcheckgenerationProtectedawaitWait for a write or generation cancellation; closing does not depend on whether the underlying write callback fires.
completiongenerationBind a local port and address asynchronously; port 0 lets the system assign a port. Use IPv4 by default.
portaddressProtectedchangedProtectedcloseClose the current transport and wake waits from the previous generation. Repeated calls are safe; the blocking flag is unchanged.
ProtectedcreateAllocate a transport for the given address family without implicitly connecting or binding a port.
addressTypeOptionalAdopt a Node transport and close the old one; do not adopt raw file descriptors.
handleReturn the latest underlying error, or undefined if none is recorded.
Return the bound local port, or 0 when unbound.
ProtectedgetProvide subclasses with the underlying Node transport, or undefined if not yet created.
ProtectedgetReturn readiness bits for pending datagrams and the current binding.
maskProtectedisReturn the binding state; derived classes may extend this.
Return whether blocking semantics use asynchronous waits.
ProtectedonClear the old transport's binding state and datagrams; the generation change cancels old reads.
ProtectedonIntegrate an allocated or adopted UDP handle into the same datagram queue and binding state.
Receive one complete datagram; discard it and return Error if the destination byte buffer is too small. With no data, nonblocking mode returns NotReady.
destinationSend a call-time data snapshot as one datagram; if unbound, automatically bind an ephemeral port for the destination address family.
dataaddressportSet whether to wait asynchronously for readability/writability. When false, return NotReady or Partial according to current queue state.
blockingClose the UDP transport and clear datagrams pending receipt.
ProtectedvalidateReject non-UDP Node transports before adoption.
handleReadonly[socketExpose overridable liveness state to Selector.
Expose overridable readiness conditions to Selector.
mask
UDP socket preserving datagram boundaries; Packet data has no TCP length header.