SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions | Variables
Projects/CoX/Common/CRUDP_Protocol

Functions

void PacketSibDestroyer (const std::pair< int, CrudP_Protocol::pPacketStorage > &a)
 
vCrudP_Packet packetSplit (CrudP_Packet &src, size_t block_size)
 
 CRUDLink::CRUDLink ()
 
 CRUDLink::~CRUDLink () override
 
void CRUDLink::event_for_packet (PacketEvent *pak_ev)
 CRUDLink::event_for_packet - convert incoming packet into higher level events and push them to our target() More...
 
void CRUDLink::packets_for_event (SEGSEvent *c_ev)
 CRUDLink::packets_for_event - convert event to 1-n packets and push them to our net_layer() More...
 
void CRUDLink::connection_update ()
 Connection updates are done only when new data is available on the link. More...
 
void CRUDLink::connection_sent_packet ()
 Connection updates are done only when new data is sent on the link. More...
 
int CRUDLink::open (void *=nullptr) override
 
int CRUDLink::handle_output (ACE_HANDLE=ACE_INVALID_HANDLE) override
 
void CRUDLink::received_block (BitStream &bytes)
 CRUDLink::received_block - convert incoming bytes to PacketEvent's. More...
 
int CRUDLink::handle_close (ACE_HANDLE h, ACE_Reactor_Mask c) override
 
 CrudP_Packet::CrudP_Packet ()
 
 CrudP_Packet::CrudP_Packet (BitStream *stream, bool hasDebugInfo)
 
 CrudP_Packet::CrudP_Packet (const CrudP_Packet &)
 
 CrudP_Packet::~CrudP_Packet ()
 
uint32_t CrudP_Packet::GetBits (uint32_t nBits)
 
void CrudP_Packet::GetBitArray (uint32_t nBytes, uint8_t *array)
 
uint32_t CrudP_Packet::GetPackedBits (uint32_t nBits)
 
void CrudP_Packet::GetString (QString &str)
 
float CrudP_Packet::GetFloat ()
 
void CrudP_Packet::setContents (const BitStream &t)
 
void CrudP_Packet::dump () const
 
uint32_t CrudP_Packet::getNextAck ()
 
 CrudP_Protocol::~CrudP_Protocol ()
 
void CrudP_Protocol::clearQueues (bool recv, bool clear_send_queue)
 
void CrudP_Protocol::ReceivedBlock (BitStream &bs)
 
void CrudP_Protocol::parseAcks (BitStream &src, CrudP_Packet *tgt)
 
void CrudP_Protocol::storeAcks (BitStream &bs)
 
void CrudP_Protocol::PushRecvPacket (CrudP_Packet *a)
 
CrudP_PacketCrudP_Protocol::RecvPacket ()
 this gets next packet in sequence, More...
 
void CrudP_Protocol::PacketAck (uint32_t)
 this acknowledges that packet with id was successfully received => acknowledged packet is removed from send queue More...
 
CrudP_PacketCrudP_Protocol::wrapPacket (CrudP_Packet *p)
 create a copy of the packet and then wrap it's content in protocol related parts. More...
 
void CrudP_Protocol::sendRaw (CrudP_Packet *pak, lCrudP_Packet &tgt)
 
bool CrudP_Protocol::SendPacket (CrudP_Packet *p)
 add the given packet to the send queue of this link, if large payload - split it into mulitple CRUDP packets More...
 
bool CrudP_Protocol::isUnresponsiveLink ()
 CrudP_Protocol::isUnresponsiveLink. More...
 
bool CrudP_Protocol::batchSend (lCrudP_Packet &tgt)
 
void CrudP_Protocol::processRetransmits ()
 Finds packets that need to be retransmitted and wraps them in protocol related bits. More...
 
static uint32_t PacketCodecNull::Checksum (const uint8_t *buf, size_t size)
 

Variables

std::set< CRUDLink * > all_links
 

Detailed Description

Function Documentation

bool CrudP_Protocol::batchSend ( lCrudP_Packet tgt)

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t PacketCodecNull::Checksum ( const uint8_t *  buf,
size_t  size 
)
static

Here is the caller graph for this function:

void CrudP_Protocol::clearQueues ( bool  recv,
bool  clear_send_queue 
)
protected

Here is the call graph for this function:

void CRUDLink::connection_sent_packet ( )
protected

Connection updates are done only when new data is sent on the link.

Here is the caller graph for this function:

void CRUDLink::connection_update ( )
protected

Connection updates are done only when new data is available on the link.

Here is the caller graph for this function:

CRUDLink::CRUDLink ( )

Here is the call graph for this function:

CrudP_Packet::CrudP_Packet ( )
CrudP_Packet::CrudP_Packet ( const CrudP_Packet from)
explicit
CrudP_Packet::CrudP_Packet ( BitStream stream,
bool  hasDebugInfo 
)
void CrudP_Packet::dump ( ) const

Here is the call graph for this function:

void CRUDLink::event_for_packet ( PacketEvent pak_ev)
protected

CRUDLink::event_for_packet - convert incoming packet into higher level events and push them to our target()

Parameters
pak_ev- received packet

Here is the call graph for this function:

Here is the caller graph for this function:

void CrudP_Packet::GetBitArray ( uint32_t  nBytes,
uint8_t *  array 
)

Here is the call graph for this function:

uint32_t CrudP_Packet::GetBits ( uint32_t  nBits)

Here is the call graph for this function:

float CrudP_Packet::GetFloat ( )

Here is the call graph for this function:

uint32_t CrudP_Packet::getNextAck ( )

Here is the caller graph for this function:

uint32_t CrudP_Packet::GetPackedBits ( uint32_t  nBits)

Here is the call graph for this function:

Here is the caller graph for this function:

void CrudP_Packet::GetString ( QString &  str)

Here is the call graph for this function:

int CRUDLink::handle_close ( ACE_HANDLE  h,
ACE_Reactor_Mask  c 
)
overrideprotected
int CRUDLink::handle_output ( ACE_HANDLE  = ACE_INVALID_HANDLE)
override

Here is the call graph for this function:

bool CrudP_Protocol::isUnresponsiveLink ( )

CrudP_Protocol::isUnresponsiveLink.

Returns
true if any packet in the reliable packets array is older than 300ms

Here is the call graph for this function:

int CRUDLink::open ( void *  p = nullptr)
override

Called when we start to service a new connection, here we tell reactor to wake us when queue() is not empty.

Here is the call graph for this function:

Here is the caller graph for this function:

void CrudP_Protocol::PacketAck ( uint32_t  id)
protected

this acknowledges that packet with id was successfully received => acknowledged packet is removed from send queue

void CRUDLink::packets_for_event ( SEGSEvent ev)
protected

CRUDLink::packets_for_event - convert event to 1-n packets and push them to our net_layer()

Parameters
ev- an event that we've received from our downstream.

Here is the call graph for this function:

Here is the caller graph for this function:

void PacketSibDestroyer ( const std::pair< int, CrudP_Protocol::pPacketStorage > &  a)

Here is the caller graph for this function:

vCrudP_Packet packetSplit ( CrudP_Packet src,
size_t  block_size 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void CrudP_Protocol::parseAcks ( BitStream src,
CrudP_Packet tgt 
)
protected

Here is the call graph for this function:

void CrudP_Protocol::processRetransmits ( )
protected

Finds packets that need to be retransmitted and wraps them in protocol related bits.

Here is the call graph for this function:

void CrudP_Protocol::PushRecvPacket ( CrudP_Packet a)
protected

Here is the call graph for this function:

void CRUDLink::received_block ( BitStream bytes)

CRUDLink::received_block - convert incoming bytes to PacketEvent's.

Parameters
bytes- raw data to convert into packets.

Here is the call graph for this function:

void CrudP_Protocol::ReceivedBlock ( BitStream bs)

Here is the call graph for this function:

Here is the caller graph for this function:

CrudP_Packet * CrudP_Protocol::RecvPacket ( )

this gets next packet in sequence,

Returns
Pointer to packet. nullptr if no packets are available or no next packet in sequence is available First. if there are no packets in avail_packets return nullptr Second. if first available packet sequence number is the same as the last popped one was, remove this duplicate Third. if first available packet sequence number is the one we want (recv_seq+1) we pop it from storage, strip it's shell, and return only a Dbg/Plain BitStream copy of it's payload

Here is the caller graph for this function:

bool CrudP_Protocol::SendPacket ( CrudP_Packet packet)

add the given packet to the send queue of this link, if large payload - split it into mulitple CRUDP packets

Parameters
packet

Here is the call graph for this function:

Here is the caller graph for this function:

void CrudP_Protocol::sendRaw ( CrudP_Packet pak,
lCrudP_Packet tgt 
)
protected

Here is the call graph for this function:

void CrudP_Packet::setContents ( const BitStream t)
void CrudP_Protocol::storeAcks ( BitStream bs)
protected

Here is the call graph for this function:

CrudP_Packet * CrudP_Protocol::wrapPacket ( CrudP_Packet p)
protected

create a copy of the packet and then wrap it's content in protocol related parts.

Here is the call graph for this function:

CRUDLink::~CRUDLink ( )
override
CrudP_Packet::~CrudP_Packet ( )
CrudP_Protocol::~CrudP_Protocol ( )

Variable Documentation

std::set<CRUDLink *> all_links