SEGS  0.6.1-develop [d2cac982]
Super Entity Game Server
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 (SEGSEvents::Packet *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 (SEGSEvents::Event *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...
 
duration CRUDLink::client_last_seen_packets () const
 return the amount of time, in milliseconds, this client hasn't received anything More...
 
duration CRUDLink::last_sent_packets () const
 return the amount of time this client wasn't sending anything 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)
 
uint32_t CrudP_Packet::GetPackedBits (uint32_t nBits)
 
void CrudP_Packet::GetString (QString &str)
 
float CrudP_Packet::GetFloat ()
 
void CrudP_Packet::StoreBits (uint32_t nBits, uint32_t dataBits)
 
void CrudP_Packet::StoreBitArray (uint8_t *array, size_t nBits)
 
void CrudP_Packet::StorePackedBits (uint32_t nBits, uint32_t dataBits)
 
void CrudP_Packet::StoreString (const char *str)
 
uint8_t * CrudP_Packet::GetBuffer ()
 
size_t CrudP_Packet::GetPacketLength () const
 
void CrudP_Packet::ByteAlign ()
 
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

◆ batchSend()

bool CrudP_Protocol::batchSend ( lCrudP_Packet tgt)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ByteAlign()

void CrudP_Packet::ByteAlign ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Checksum()

uint32_t PacketCodecNull::Checksum ( const uint8_t *  buf,
size_t  size 
)
static
Here is the caller graph for this function:

◆ clearQueues()

void CrudP_Protocol::clearQueues ( bool  recv,
bool  clear_send_queue 
)
protected
Here is the call graph for this function:

◆ client_last_seen_packets()

CRUDLink::duration CRUDLink::client_last_seen_packets ( ) const

return the amount of time, in milliseconds, this client hasn't received anything

◆ connection_sent_packet()

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:

◆ connection_update()

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::CRUDLink ( )
Here is the call graph for this function:

◆ CrudP_Packet() [1/3]

CrudP_Packet::CrudP_Packet ( )

◆ CrudP_Packet() [2/3]

CrudP_Packet::CrudP_Packet ( const CrudP_Packet from)
explicit

◆ CrudP_Packet() [3/3]

CrudP_Packet::CrudP_Packet ( BitStream stream,
bool  hasDebugInfo 
)

◆ dump()

void CrudP_Packet::dump ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ event_for_packet()

void CRUDLink::event_for_packet ( SEGSEvents::Packet 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:

◆ GetBits()

uint32_t CrudP_Packet::GetBits ( uint32_t  nBits)
Here is the call graph for this function:

◆ GetBuffer()

uint8_t * CrudP_Packet::GetBuffer ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFloat()

float CrudP_Packet::GetFloat ( )
Here is the call graph for this function:

◆ getNextAck()

uint32_t CrudP_Packet::getNextAck ( )
Here is the caller graph for this function:

◆ GetPackedBits()

uint32_t CrudP_Packet::GetPackedBits ( uint32_t  nBits)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPacketLength()

size_t CrudP_Packet::GetPacketLength ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetString()

void CrudP_Packet::GetString ( QString &  str)
Here is the call graph for this function:

◆ handle_close()

int CRUDLink::handle_close ( ACE_HANDLE  h,
ACE_Reactor_Mask  c 
)
overrideprotected

◆ handle_output()

int CRUDLink::handle_output ( ACE_HANDLE  = ACE_INVALID_HANDLE)
override
Here is the call graph for this function:

◆ isUnresponsiveLink()

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:

◆ last_sent_packets()

CRUDLink::duration CRUDLink::last_sent_packets ( ) const

return the amount of time this client wasn't sending anything

Here is the caller graph for this function:

◆ open()

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:

◆ PacketAck()

void CrudP_Protocol::PacketAck ( uint32_t  id)
protected

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

◆ packets_for_event()

void CRUDLink::packets_for_event ( SEGSEvents::Event c_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:

◆ PacketSibDestroyer()

void PacketSibDestroyer ( const std::pair< int, CrudP_Protocol::pPacketStorage > &  a)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ packetSplit()

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:

◆ parseAcks()

void CrudP_Protocol::parseAcks ( BitStream src,
CrudP_Packet tgt 
)
protected
Here is the call graph for this function:

◆ processRetransmits()

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:

◆ PushRecvPacket()

void CrudP_Protocol::PushRecvPacket ( CrudP_Packet a)
protected
Here is the call graph for this function:

◆ received_block()

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:
Here is the caller graph for this function:

◆ ReceivedBlock()

void CrudP_Protocol::ReceivedBlock ( BitStream bs)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RecvPacket()

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:

◆ SendPacket()

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:

◆ sendRaw()

void CrudP_Protocol::sendRaw ( CrudP_Packet pak,
lCrudP_Packet tgt 
)
protected
Here is the call graph for this function:

◆ setContents()

void CrudP_Packet::setContents ( const BitStream t)
Here is the caller graph for this function:

◆ storeAcks()

void CrudP_Protocol::storeAcks ( BitStream bs)
protected
Here is the call graph for this function:

◆ StoreBitArray()

void CrudP_Packet::StoreBitArray ( uint8_t *  array,
size_t  nBits 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StoreBits()

void CrudP_Packet::StoreBits ( uint32_t  nBits,
uint32_t  dataBits 
)
Here is the call graph for this function:

◆ StorePackedBits()

void CrudP_Packet::StorePackedBits ( uint32_t  nBits,
uint32_t  dataBits 
)
Here is the call graph for this function:

◆ StoreString()

void CrudP_Packet::StoreString ( const char *  str)
Here is the call graph for this function:

◆ wrapPacket()

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::~CRUDLink ( )
override

◆ ~CrudP_Packet()

CrudP_Packet::~CrudP_Packet ( )

◆ ~CrudP_Protocol()

CrudP_Protocol::~CrudP_Protocol ( )

Variable Documentation

◆ all_links

std::set<CRUDLink *> all_links