Classes | |
struct | BufferedPacket |
class | Channel |
class | Connection |
class | ConnectionBindFailed |
struct | ConnectionCommand |
struct | ConnectionEvent |
class | ConnectionException |
class | ConnectionReceiveThread |
class | ConnectionSendThread |
class | IConnection |
class | IncomingDataCorruption |
class | IncomingSplitBuffer |
struct | IncomingSplitPacket |
class | InvalidIncomingDataException |
class | IPeer |
class | NotFoundException |
struct | OutgoingPacket |
class | Peer |
class | PeerHandler |
class | PeerHelper |
class | PeerNotFoundException |
class | ProcessedQueued |
class | ProcessedSilentlyException |
class | ReliablePacketBuffer |
class | UDPPeer |
Typedefs | |
typedef std::shared_ptr< ConnectionEvent > | ConnectionEventPtr |
typedef std::shared_ptr< ConnectionCommand > | ConnectionCommandPtr |
typedef std::shared_ptr< BufferedPacket > | BufferedPacketPtr |
Enumerations | |
enum | rtt_stat_type { MIN_RTT , MAX_RTT , AVG_RTT , MIN_JITTER , MAX_JITTER , AVG_JITTER } |
enum | rate_stat_type { CUR_DL_RATE , AVG_DL_RATE , CUR_INC_RATE , AVG_INC_RATE , CUR_LOSS_RATE , AVG_LOSS_RATE } |
enum | ConnectionEventType { CONNEVENT_NONE , CONNEVENT_DATA_RECEIVED , CONNEVENT_PEER_ADDED , CONNEVENT_PEER_REMOVED , CONNEVENT_BIND_FAILED } |
enum | PacketType : u8 { PACKET_TYPE_CONTROL = 0 , PACKET_TYPE_ORIGINAL = 1 , PACKET_TYPE_SPLIT = 2 , PACKET_TYPE_RELIABLE = 3 , PACKET_TYPE_MAX } |
enum | ConnectionCommandType { CONNCMD_NONE , CONNCMD_SERVE , CONNCMD_CONNECT , CONNCMD_DISCONNECT , CONNCMD_DISCONNECT_PEER , CONNCMD_SEND , CONNCMD_SEND_TO_ALL , CONCMD_ACK , CONCMD_CREATE_PEER , CONNCMD_RESEND_ONE } |
Functions | |
IConnection * | createMTP (float timeout, bool ipv6, PeerHandler *handler) |
BufferedPacketPtr | makePacket (const Address &address, const SharedBuffer< u8 > &data, u32 protocol_id, session_t sender_peer_id, u8 channel) |
SharedBuffer< u8 > | makeOriginalPacket (const SharedBuffer< u8 > &data) |
void | makeSplitPacket (const SharedBuffer< u8 > &data, u32 chunksize_max, u16 seqnum, std::list< SharedBuffer< u8 > > *chunks) |
void | makeAutoSplitPacket (const SharedBuffer< u8 > &data, u32 chunksize_max, u16 &split_seqnum, std::list< SharedBuffer< u8 > > *list) |
SharedBuffer< u8 > | makeReliablePacket (const SharedBuffer< u8 > &data, u16 seqnum) |
bool | seqnum_higher (u16 totest, u16 base) |
bool | seqnum_in_window (u16 seqnum, u16 next, u16 window_size) |
float | CALC_DTIME (u64 lasttime, u64 curtime) |
static session_t | readPeerId (const u8 *packetdata) |
static u8 | readChannel (const u8 *packetdata) |
typedef std::shared_ptr<BufferedPacket> con::BufferedPacketPtr |
typedef std::shared_ptr<ConnectionCommand> con::ConnectionCommandPtr |
typedef std::shared_ptr<ConnectionEvent> con::ConnectionEventPtr |
enum con::PacketType : u8 |
enum con::rate_stat_type |
enum con::rtt_stat_type |
|
inline |
Referenced by con::Peer::isTimedOut(), con::ConnectionReceiveThread::run(), and con::ConnectionSendThread::run().
IConnection * con::createMTP | ( | float | timeout, |
bool | ipv6, | ||
PeerHandler * | handler ) |
void con::makeAutoSplitPacket | ( | const SharedBuffer< u8 > & | data, |
u32 | chunksize_max, | ||
u16 & | split_seqnum, | ||
std::list< SharedBuffer< u8 > > * | list ) |
References SharedBuffer< T >::getSize(), makeOriginalPacket(), and makeSplitPacket().
Referenced by con::UDPPeer::processReliableSendCommand(), and con::ConnectionSendThread::send().
SharedBuffer< u8 > con::makeOriginalPacket | ( | const SharedBuffer< u8 > & | data | ) |
References SharedBuffer< T >::getSize(), PACKET_TYPE_ORIGINAL, and writeU8().
Referenced by makeAutoSplitPacket().
BufferedPacketPtr con::makePacket | ( | const Address & | address, |
const SharedBuffer< u8 > & | data, | ||
u32 | protocol_id, | ||
session_t | sender_peer_id, | ||
u8 | channel ) |
References BASE_HEADER_SIZE, SharedBuffer< T >::getSize(), p(), writeU16(), writeU32(), and writeU8().
Referenced by con::ConnectionReceiveThread::handlePacketType_Reliable(), con::ConnectionReceiveThread::handlePacketType_Split(), con::UDPPeer::processReliableSendCommand(), con::ConnectionSendThread::rawSendAsPacket(), and TestConnection::testHelpers().
SharedBuffer< u8 > con::makeReliablePacket | ( | const SharedBuffer< u8 > & | data, |
u16 | seqnum ) |
References SharedBuffer< T >::getSize(), PACKET_TYPE_RELIABLE, writeU16(), and writeU8().
Referenced by con::UDPPeer::processReliableSendCommand(), con::ConnectionSendThread::rawSendAsPacket(), and TestConnection::testHelpers().
void con::makeSplitPacket | ( | const SharedBuffer< u8 > & | data, |
u32 | chunksize_max, | ||
u16 | seqnum, | ||
std::list< SharedBuffer< u8 > > * | chunks ) |
References SharedBuffer< T >::getSize(), PACKET_TYPE_SPLIT, sanity_check, writeU16(), and writeU8().
Referenced by makeAutoSplitPacket().
|
inlinestatic |
References readU8().
Referenced by con::ConnectionReceiveThread::checkIncomingBuffers(), con::ConnectionReceiveThread::receive(), and con::ConnectionSendThread::resendReliable().
|
inlinestatic |
References readU16().
Referenced by con::ConnectionReceiveThread::checkIncomingBuffers(), and con::ConnectionReceiveThread::receive().
|
inline |
References SEQNUM_MAX.
Referenced by con::ConnectionReceiveThread::handlePacketType_Reliable().
|
inline |
References SEQNUM_MAX.
Referenced by con::ConnectionReceiveThread::handlePacketType_Reliable(), and con::ReliablePacketBuffer::insert().