class

UdpPacket

class UdpPacket : Obj

UdpPacket encapsulates an IpAddr, port, and payload of bytes to send or receive from a UdpSocket.

constructors make

Construct a new UdpPacket

fields addr

The send or receive IpAddr

data

The payload to send or received

port

The send or receive port number

addr IpAddr? : addr

The send or receive IpAddr. Defaults to null.

data Buf? : data

The payload to send or received. Defaults to null. The data buffer must always be a memory backed buffer.

make new make(IpAddr? addr := null, Int? port := null, Buf? data := null)

Construct a new UdpPacket.

port Int? : port

The send or receive port number. Defaults to null.

Haxall 4.0.6 ∙ 21-Jul-2026 09:48 EDT