sys::Obj inet::UdpDatagram
public class UdpDatagram
UdpDatagram is used to encapsulate the buffer of data and the IP address for sending and receiving UDP packets with a UdpSocket.
public IpAddr addr
The IP address to send this packet to, or the address we received this packet from. Note this is a shared instance during receive and must be copied to a new memory location if you wish to keep it.
public byte[] buf
The buffer of data to send (must never be null)
public int flowinfo
IPv6 address flow info
public int len
Number of bytes past buf+off to send or receive, after receive() specified the number of bytes actually read
public int off
Offset into buffer
public int port
The IP port for address to send or receive
public int scopeId
IPv6 address scope ID
public void getSocketAddr(SocketAddr sockAddr)
Copy the datagram to the socket address (makes a deep copy of the host addr).
public void setSocketAddr(SocketAddr sockAddr)
Copy this address to the datagram (makes a shallow copy of the host addr).