UdpPacket
class UdpPacket : Obj
UdpPacket encapsulates an IpAddr, port, and payload of bytes to send or receive from a UdpSocket.
Construct a new UdpPacket
The payload to send or received
The send or receive port number
The send or receive IpAddr
IpAddr? : addr
The send or receive IpAddr. Defaults to null.
Buf? : data
The payload to send or received. Defaults to null. The data buffer must always be a memory backed buffer.
new make(IpAddr? addr, Int? port, Buf? data)
Construct a new UdpPacket.
Int? : port
The send or receive port number. Defaults to null.