#include <datagramUDPHeader.h>
Public Member Functions | |
DatagramUDPHeader (const NetDatagram &datagram) | |
This constructor creates a header based on an already-constructed NetDatagram. | |
DatagramUDPHeader (const void *data) | |
This constructor decodes a header from a block of data of length datagram_udp_header_size, presumably just read from a socket. | |
int | get_datagram_checksum () const |
Returns the checksum appropriate for the indicated datagram. | |
string | get_header () const |
Returns a pointer to a block of data of length datagram_udp_header_size, which can be written to the network as the header information. | |
bool | verify_datagram (const NetDatagram &datagram) const |
Verifies that the indicated datagram has the appropriate length and checksum. | |
Private Attributes | |
NetDatagram | _header |
Like NetDatagram, this class automatically handles converting its data to and from the network byte ordering.
Definition at line 52 of file datagramUDPHeader.h.
|
This constructor creates a header based on an already-constructed NetDatagram.
Definition at line 40 of file datagramUDPHeader.cxx. References DatagramTCPHeader::_header. |
|
This constructor decodes a header from a block of data of length datagram_udp_header_size, presumably just read from a socket.
Definition at line 65 of file datagramUDPHeader.cxx. References size_t. |
|
Returns the checksum appropriate for the indicated datagram.
Definition at line 34 of file datagramUDPHeader.I. References _header, Datagram::get_message(), and INLINE. |
|
Returns a pointer to a block of data of length datagram_udp_header_size, which can be written to the network as the header information.
Definition at line 52 of file datagramUDPHeader.I. Referenced by Connection::set_keep_alive(). |
|
Verifies that the indicated datagram has the appropriate length and checksum. Returns true if it matches, false otherwise. Definition at line 81 of file datagramUDPHeader.cxx. |
|
Definition at line 66 of file datagramUDPHeader.h. Referenced by get_datagram_checksum(). |