A specific kind of Datagram, especially for sending across or receiving from a network.
More...
#include "netDatagram.h"
List of all members.
Public Member Functions |
| | NetDatagram () |
| | Constructs an empty datagram.
|
| | NetDatagram (const void *data, size_t size) |
| | Constructs a datagram from an existing block of data.
|
|
| NetDatagram (const NetDatagram ©) |
|
| NetDatagram (const Datagram ©) |
| virtual void | clear () |
| | Resets the datagram to empty, in preparation for building up a new datagram.
|
|
virtual TypeHandle | force_init_type () |
| const NetAddress & | get_address () const |
| | Retrieves the host from which the datagram was read, or to which it is scheduled to be sent.
|
|
virtual TypeHandle | get_type () const |
|
bool | operator!= (const NetDatagram &other) const |
|
bool | operator< (const NetDatagram &other) const |
|
void | operator= (const Datagram ©) |
|
void | operator= (const NetDatagram ©) |
|
bool | operator== (const NetDatagram &other) const |
|
| PT (Connection) get_connection() const |
| void | set_address (const NetAddress &address) |
| | Specifies the host to which the datagram should be sent.
|
| void | set_connection (const PT(Connection)&connection) |
| | Specifies the socket to which the datagram should be written.
|
Static Public Member Functions |
|
static TypeHandle | get_class_type () |
| static void | init_type () |
| | This function is declared non-inline to work around a compiler bug in g++ 2.96.
|
Detailed Description
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 NetAddress it is to be sent to or was received from.
Definition at line 43 of file netDatagram.h.
Constructor & Destructor Documentation
| NetDatagram::NetDatagram |
( |
| ) |
|
| NetDatagram::NetDatagram |
( |
const void * |
data, |
|
|
size_t |
size |
|
) |
| |
Constructs a datagram from an existing block of data.
Definition at line 34 of file netDatagram.cxx.
Member Function Documentation
| void NetDatagram::clear |
( |
| ) |
[virtual] |
| const NetAddress & NetDatagram::get_address |
( |
| ) |
const |
Retrieves the host from which the datagram was read, or to which it is scheduled to be sent.
Definition at line 139 of file netDatagram.cxx.
| static void NetDatagram::init_type |
( |
| ) |
[inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from Datagram.
Definition at line 77 of file netDatagram.h.
References Datagram::init_type().
| void NetDatagram::set_address |
( |
const NetAddress & |
address | ) |
|
| void NetDatagram::set_connection |
( |
const PT(Connection)& |
connection | ) |
|
The documentation for this class was generated from the following files: