Minetest 5.9.0-dev
 
Loading...
Searching...
No Matches
connection_internal.h File Reference
#include "connection.h"
+ Include dependency graph for connection_internal.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  con::BufferedPacket
 
struct  con::IncomingSplitPacket
 
class  con::ReliablePacketBuffer
 
class  con::IncomingSplitBuffer
 
struct  con::ConnectionCommand
 
class  con::Channel
 
class  con::UDPPeer
 

Namespaces

namespace  con
 

Macros

#define MAX_UDP_PEERS   65535
 
#define BASE_HEADER_SIZE   7
 
#define CHANNEL_COUNT   3
 
#define ORIGINAL_HEADER_SIZE   1
 
#define RELIABLE_HEADER_SIZE   3
 
#define SEQNUM_INITIAL   65500
 
#define SEQNUM_MAX   65535
 
#define MAX_RELIABLE_WINDOW_SIZE   0x8000
 
#define START_RELIABLE_WINDOW_SIZE   0x400
 
#define MIN_RELIABLE_WINDOW_SIZE   0x40
 

Enumerations

enum  ControlType : u8 { CONTROLTYPE_ACK = 0 , CONTROLTYPE_SET_PEER_ID = 1 , CONTROLTYPE_PING = 2 , CONTROLTYPE_DISCO = 3 }
 
enum  con::PacketType : u8 {
  con::PACKET_TYPE_CONTROL = 0 , con::PACKET_TYPE_ORIGINAL = 1 , con::PACKET_TYPE_SPLIT = 2 , con::PACKET_TYPE_RELIABLE = 3 ,
  con::PACKET_TYPE_MAX
}
 
enum  con::ConnectionCommandType {
  con::CONNCMD_NONE , con::CONNCMD_SERVE , con::CONNCMD_CONNECT , con::CONNCMD_DISCONNECT ,
  con::CONNCMD_DISCONNECT_PEER , con::CONNCMD_SEND , con::CONNCMD_SEND_TO_ALL , con::CONCMD_ACK ,
  con::CONCMD_CREATE_PEER , con::CONNCMD_RESEND_ONE
}
 

Functions

bool con::seqnum_higher (u16 totest, u16 base)
 
bool con::seqnum_in_window (u16 seqnum, u16 next, u16 window_size)
 
float con::CALC_DTIME (u64 lasttime, u64 curtime)
 
BufferedPacketPtr con::makePacket (const Address &address, const SharedBuffer< u8 > &data, u32 protocol_id, session_t sender_peer_id, u8 channel)
 
void con::makeAutoSplitPacket (const SharedBuffer< u8 > &data, u32 chunksize_max, u16 &split_seqnum, std::list< SharedBuffer< u8 > > *list)
 
SharedBuffer< u8 > con::makeReliablePacket (const SharedBuffer< u8 > &data, u16 seqnum)
 

Macro Definition Documentation

◆ BASE_HEADER_SIZE

#define BASE_HEADER_SIZE   7

◆ CHANNEL_COUNT

#define CHANNEL_COUNT   3

◆ MAX_RELIABLE_WINDOW_SIZE

#define MAX_RELIABLE_WINDOW_SIZE   0x8000

◆ MAX_UDP_PEERS

#define MAX_UDP_PEERS   65535

◆ MIN_RELIABLE_WINDOW_SIZE

#define MIN_RELIABLE_WINDOW_SIZE   0x40

◆ ORIGINAL_HEADER_SIZE

#define ORIGINAL_HEADER_SIZE   1

◆ RELIABLE_HEADER_SIZE

#define RELIABLE_HEADER_SIZE   3

◆ SEQNUM_INITIAL

#define SEQNUM_INITIAL   65500

◆ SEQNUM_MAX

#define SEQNUM_MAX   65535

◆ START_RELIABLE_WINDOW_SIZE

#define START_RELIABLE_WINDOW_SIZE   0x400

Enumeration Type Documentation

◆ ControlType

enum ControlType : u8
Enumerator
CONTROLTYPE_ACK 
CONTROLTYPE_SET_PEER_ID 
CONTROLTYPE_PING 
CONTROLTYPE_DISCO