A specific kind of Datagram, especially for sending across or receiving from a network. It’s different only in that it knows which Connection and/or
NetAddressit is to be sent to or was received from.
NetDatagram(void const *data, std::size_t size)¶
NetDatagram(NetDatagram const ©)¶
Constructs an empty datagram.
Constructs a datagram from an existing block of data.
NetAddress const &get_address(void) const¶
Retrieves the host from which the datagram was read, or to which it is scheduled to be sent.
PointerTo<Connection> get_connection(void) const¶
Retrieves the socket from which the datagram was read, or to which it is scheduled to be written.
void set_address(NetAddress const &address)¶
Specifies the host to which the datagram should be sent.