Definition at line 10 of file Packet.h.
Public Types | |
enum | { IDLEN = 7, TIMELEN = 9, TYPELEN = 1, OVERHEAD = 2 } |
enumeration for generic packet data More... | |
enum | { END = 13, START = 58 } |
enumerations for the starts and ends of packets More... | |
enum | Type { HBEAT = 72, LOGIN = 76, JOYST = 74, NOSET = 0 } |
enumeration for the types of packets More... | |
Public Member Functions | |
virtual char | getType () |
get the type of the packet | |
virtual int | getTime () |
get the time the packet was registered if set to 0 it has not been registered | |
virtual int | getID () |
get the ID of the packet | |
virtual void | setType (Type packetType) |
set the type of packet | |
virtual void | registerPacket ()=0 |
register the packet to be sent over the outNet | |
virtual int | sendPacket (int fd)=0 |
send the packet over the outNet or another file descritor | |
virtual void | setTime () |
set the time for the packet | |
virtual void | setTime (int newTime) |
set the time for the packet | |
virtual void | setID () |
set the ID of the packet | |
virtual void | setID (int newID) |
set the ID of the packet | |
Protected Attributes | |
char | type |
type of packet | |
char | cTime [TIMELEN] |
time packet was sent | |
char | ID [IDLEN] |
the id of the packet |
|
enumeration for generic packet data
|
|
enumerations for the starts and ends of packets
|
|
enumeration for the types of packets
|
|
get the ID of the packet
|
|
get the time the packet was registered if set to 0 it has not been registered
|
|
get the type of the packet
|
|
send the packet over the outNet or another file descritor
Implemented in HBeatPacket, JoystPacket, and LoginPacket. |
|
set the ID of the packet
|
|
set the time for the packet
|
|
set the type of packet
|