LibNRG  0.0.1
Networking for Real-time Games library
 All Classes Files Functions Variables Friends
nrg::PacketHeader Struct Reference

Class representing a header to be prepended to packets that pass through ConnectionIn and ConnectionOut.

#include <nrg_packet_header.h>

Public Member Functions

 PacketHeader ()
 Default constructor.
 
 PacketHeader (uint16_t seq, uint8_t flags, uint8_t frag_index=0)
 Constructor specifying all attributes.
 
bool read (Packet &p)
 Read a header from a packet p, returning true if successful.
 
void write (Packet &p)
 Write this PacketHeader instance to the given packet p.
 

Public Attributes

uint16_t seq_num
 
uint8_t flags
 
uint32_t version
 
uint32_t frag_index
 

Static Public Attributes

static const size_t size = 4
 

The documentation for this struct was generated from the following file: