#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/network/packet/Packet.h>
- Author
- Oliver Scheuss <scheusso [at] ee.ethz.ch>
orxonox::packet::Packet::Packet |
( |
const Packet & |
p | ) |
|
orxonox::packet::Packet::~Packet |
( |
| ) |
|
|
virtual |
Destroys a packet completely.
That also means destroying the ENetPacket if one exists. There
orxonox::packet::Packet::Packet |
( |
| ) |
|
|
protected |
orxonox::packet::Packet::Packet |
( |
uint8_t * |
data, |
|
|
unsigned int |
peerID |
|
) |
| |
|
protected |
Packet * orxonox::packet::Packet::createPacket |
( |
ENetPacket * |
packet, |
|
|
uint32_t |
peerID |
|
) |
| |
|
static |
Given an ENetPacket, create an Orxonox packet.
- Parameters
-
packet | The ENetPacket |
peerID | The sender |
ENet calls this method whenever it wants to destroy a packet that contains data we allocated ourselves.
virtual unsigned char* orxonox::packet::Packet::getData |
( |
| ) |
|
|
inlinevirtual |
uint32_t orxonox::packet::Packet::getFlags |
( |
| ) |
|
|
inline |
int orxonox::packet::Packet::getPeerID |
( |
| ) |
|
|
inline |
uint32_t orxonox::packet::Packet::getRequiredGamestateID |
( |
| ) |
|
|
inline |
virtual unsigned int orxonox::packet::Packet::getSize |
( |
| ) |
const |
|
pure virtual |
bool orxonox::packet::Packet::isDataENetAllocated |
( |
| ) |
const |
|
inlineprotected |
bool orxonox::packet::Packet::isReliable |
( |
| ) |
|
|
inline |
virtual bool orxonox::packet::Packet::process |
( |
orxonox::Host * |
host | ) |
|
|
pure virtual |
void orxonox::packet::Packet::setPeerID |
( |
int |
id | ) |
|
|
inline |
bool orxonox::packet::Packet::bDataENetAllocated_ |
|
protected |
Tells whether data_ was allocated by ENet or ourselves.
data_ might no correlate with enetPacket_->data.
uint8_t* orxonox::packet::Packet::data_ |
|
protected |
Pointer to the data.
Be careful when deleting it because it might point to a location that was allocated by ENet. See bDataENetAllocated_
uint32_t orxonox::packet::Packet::flags_ |
|
protected |
Direction orxonox::packet::Packet::packetDirection_ |
|
protected |
std::map< size_t, Packet * > orxonox::packet::Packet::packetMap_ |
|
staticprivate |
boost::mutex orxonox::packet::Packet::packetMapMutex_ |
|
staticprivate |
unsigned int orxonox::packet::Packet::peerID_ |
|
protected |
uint32_t orxonox::packet::Packet::requiredGamestateID_ |
|
protected |
The documentation for this class was generated from the following files: