Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
NetGram Class Reference

#include <NetGram.h>

List of all members.

Public Member Functions

 NetGram (const NetAddr &src, Text msg)
 NetGram (const NetAddr &dst, Text user_data, int retries)
int operator== (const NetGram &g) const
int operator< (const NetGram &g) const
DWORD PacketID () const
DWORD Sequence () const
DWORD SendTime () const
BYTE * Data () const
BYTE * UserData () const
int Size () const
const TextBody () const
const NetAddrAddress () const
bool IsAck () const
bool IsReliable () const
int Retries () const
void Retry ()
NetGram Ack ()
void ClearAck ()

Static Public Member Functions

static const char * TYPENAME ()

Protected Member Functions

 NetGram ()

Protected Attributes

NetAddr addr
int retries
DWORD send_time
DWORD packet_id
Text body

Detailed Description

Definition at line 35 of file NetGram.h.


Constructor & Destructor Documentation

NetGram::NetGram ( const NetAddr src,
Text  msg 
)

NetGram constructor for receiving packets from remote hosts

Definition at line 36 of file NetGram.cpp.

NetGram::NetGram ( const NetAddr dst,
Text  user_data,
int  r 
)

NetGram constructor for composing packets to send to remote hosts

Definition at line 54 of file NetGram.cpp.

NetGram::NetGram ( )
protected

NetGram constructor for ACK packets

Definition at line 29 of file NetGram.cpp.


Member Function Documentation

NetGram NetGram::Ack ( )

Definition at line 92 of file NetGram.cpp.

const NetAddr& NetGram::Address ( ) const
inline

Definition at line 57 of file NetGram.h.

const Text& NetGram::Body ( ) const
inline

Definition at line 56 of file NetGram.h.

void NetGram::ClearAck ( )
inline

Definition at line 65 of file NetGram.h.

BYTE* NetGram::Data ( ) const
inline

Definition at line 53 of file NetGram.h.

bool NetGram::IsAck ( ) const
inline

Definition at line 59 of file NetGram.h.

bool NetGram::IsReliable ( ) const
inline

Definition at line 60 of file NetGram.h.

int NetGram::operator< ( const NetGram g) const
inline

Definition at line 48 of file NetGram.h.

int NetGram::operator== ( const NetGram g) const
inline

Definition at line 46 of file NetGram.h.

DWORD NetGram::PacketID ( ) const
inline

Definition at line 50 of file NetGram.h.

int NetGram::Retries ( ) const
inline

Definition at line 61 of file NetGram.h.

void NetGram::Retry ( )

Definition at line 81 of file NetGram.cpp.

DWORD NetGram::SendTime ( ) const
inline

Definition at line 52 of file NetGram.h.

DWORD NetGram::Sequence ( ) const
inline

Definition at line 51 of file NetGram.h.

int NetGram::Size ( ) const
inline

Definition at line 55 of file NetGram.h.

static const char* NetGram::TYPENAME ( )
inlinestatic

Definition at line 38 of file NetGram.h.

BYTE* NetGram::UserData ( ) const
inline

Definition at line 54 of file NetGram.h.


Member Data Documentation

NetAddr NetGram::addr
protected

Definition at line 70 of file NetGram.h.

Text NetGram::body
protected

Definition at line 75 of file NetGram.h.

DWORD NetGram::packet_id
protected

Definition at line 74 of file NetGram.h.

int NetGram::retries
protected

Definition at line 71 of file NetGram.h.

DWORD NetGram::send_time
protected

Definition at line 72 of file NetGram.h.


The documentation for this class was generated from the following files: