#include <C4NetIO.h>
Public Types | |
typedef uint32_t | nr_t |
Public Member Functions | |
Packet () | |
Packet (C4NetIOPacket &&rnData, nr_t inNr) | |
~Packet () | |
C4NetIOPacket & | GetData () |
const C4NetIOPacket & | GetData () const |
nr_t | GetNr () const |
bool | Empty () const |
bool | Multicast () const |
nr_t | FragmentCnt () const |
C4NetIOPacket | GetFragment (nr_t iFNr, bool fBroadcastFlag=false) const |
bool | Complete () const |
bool | FragmentPresent (nr_t iFNr) const |
bool | AddFragment (const C4NetIOPacket &Packet, const C4NetIO::addr_t &addr) |
Static Public Attributes | |
static const size_t | MaxSize = 512 |
static const size_t | MaxDataSize = MaxSize - sizeof(DataPacketHdr) |
Protected Member Functions | |
::size_t | FragmentSize (nr_t iFNr) const |
Protected Attributes | |
nr_t | iNr |
C4NetIOPacket | Data |
bool * | pFragmentGot {nullptr} |
Packet * | Next |
Packet * | Prev |
Friends | |
class | PacketList |
typedef uint32_t C4NetIOUDP::Packet::nr_t |
C4NetIOUDP::Packet::Packet | ( | ) |
Definition at line 2922 of file C4NetIO.cpp.
C4NetIOUDP::Packet::Packet | ( | C4NetIOPacket && | rnData, |
nr_t | inNr | ||
) |
Definition at line 2929 of file C4NetIO.cpp.
C4NetIOUDP::Packet::~Packet | ( | ) |
Definition at line 2937 of file C4NetIO.cpp.
bool C4NetIOUDP::Packet::AddFragment | ( | const C4NetIOPacket & | Packet, |
const C4NetIO::addr_t & | addr | ||
) |
Definition at line 2985 of file C4NetIO.cpp.
References C4NetIOUDP::DataPacketHdr::FNr, C4NetIOUDP::PacketHdr::Nr, and C4NetIOUDP::DataPacketHdr::Size.
Referenced by C4NetIOUDP::Peer::OnRecv().
bool C4NetIOUDP::Packet::Complete | ( | ) | const |
Definition at line 2971 of file C4NetIO.cpp.
|
inline |
Definition at line 692 of file C4NetIO.h.
References Data, and StdBuf::isNull().
C4NetIOUDP::Packet::nr_t C4NetIOUDP::Packet::FragmentCnt | ( | ) | const |
Definition at line 2947 of file C4NetIO.cpp.
Referenced by C4NetIOUDP::PacketList::AddPacket(), C4NetIOUDP::Broadcast(), C4NetIOUDP::BroadcastDirect(), C4NetIOUDP::Peer::CheckCompleteIPackets(), C4NetIOUDP::Peer::Send(), and C4NetIOUDP::Peer::SendDirect().
bool C4NetIOUDP::Packet::FragmentPresent | ( | nr_t | iFNr | ) | const |
Definition at line 2980 of file C4NetIO.cpp.
Referenced by C4NetIOUDP::PacketList::FragmentPresent().
|
protected |
Definition at line 3038 of file C4NetIO.cpp.
|
inline |
Definition at line 689 of file C4NetIO.h.
References Data.
Referenced by C4NetIOUDP::Peer::CheckCompleteIPackets(), and C4NetIOUDP::Peer::Send().
|
inline |
C4NetIOPacket C4NetIOUDP::Packet::GetFragment | ( | nr_t | iFNr, |
bool | fBroadcastFlag = false |
||
) | const |
Definition at line 2952 of file C4NetIO.cpp.
References C4NetIOUDP::DataPacketHdr::FNr, C4NetIOUDP::IPID_Data, C4NetIOUDP::PacketHdr::Nr, C4NetIOUDP::Packet, C4NetIOUDP::DataPacketHdr::Size, and C4NetIOUDP::PacketHdr::StatusByte.
Referenced by C4NetIOUDP::BroadcastDirect(), and C4NetIOUDP::Peer::SendDirect().
|
inline |
Definition at line 691 of file C4NetIO.h.
References iNr.
Referenced by C4NetIOUDP::PacketList::AddPacket(), C4NetIOUDP::BroadcastDirect(), C4NetIOUDP::Peer::CheckCompleteIPackets(), C4NetIOUDP::PacketList::FragmentPresent(), and C4NetIOUDP::Peer::SendDirect().
|
inline |
Definition at line 693 of file C4NetIO.h.
References Data, and C4NetIOPacket::getStatus().
|
friend |
|
protected |
Definition at line 684 of file C4NetIO.h.
Referenced by Empty(), GetData(), and Multicast().
|
protected |
|
static |
|
protected |
Definition at line 704 of file C4NetIO.h.
Referenced by C4NetIOUDP::PacketList::AddPacket(), and C4NetIOUDP::PacketList::DeletePacket().
|
protected |
|
protected |
Definition at line 704 of file C4NetIO.h.
Referenced by C4NetIOUDP::PacketList::AddPacket(), C4NetIOUDP::PacketList::DeletePacket(), C4NetIOUDP::PacketList::GetPacket(), and C4NetIOUDP::PacketList::GetPacketFrgm().