Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
con::ConnectionCommand Struct Reference

#include <internal.h>

+ Collaboration diagram for con::ConnectionCommand:

Public Member Functions

 DISABLE_CLASS_COPY (ConnectionCommand)
 

Static Public Member Functions

static ConnectionCommandPtr serve (Address address)
 
static ConnectionCommandPtr connect (Address address)
 
static ConnectionCommandPtr disconnect ()
 
static ConnectionCommandPtr disconnect_peer (session_t peer_id)
 
static ConnectionCommandPtr resend_one (session_t peer_id)
 
static ConnectionCommandPtr send (session_t peer_id, u8 channelnum, NetworkPacket *pkt, bool reliable)
 
static ConnectionCommandPtr ack (session_t peer_id, u8 channelnum, const Buffer< u8 > &data)
 
static ConnectionCommandPtr createPeer (session_t peer_id, const Buffer< u8 > &data)
 

Public Attributes

const ConnectionCommandType type
 
Address address
 
session_t peer_id = PEER_ID_INEXISTENT
 
u8 channelnum = 0
 
Buffer< u8 > data
 
bool reliable = false
 
bool raw = false
 

Private Member Functions

 ConnectionCommand (ConnectionCommandType type_)
 

Static Private Member Functions

static ConnectionCommandPtr create (ConnectionCommandType type)
 

Constructor & Destructor Documentation

◆ ConnectionCommand()

con::ConnectionCommand::ConnectionCommand ( ConnectionCommandType type_)
inlineprivate

Referenced by create().

+ Here is the caller graph for this function:

Member Function Documentation

◆ ack()

ConnectionCommandPtr con::ConnectionCommand::ack ( session_t peer_id,
u8 channelnum,
const Buffer< u8 > & data )
static

References channelnum, con::CONCMD_ACK, Buffer< T >::copyTo(), create(), data, and peer_id.

Referenced by con::Connection::sendAck().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ connect()

ConnectionCommandPtr con::ConnectionCommand::connect ( Address address)
static

References address, con::CONNCMD_CONNECT, and create().

Referenced by con::Connection::Connect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

ConnectionCommandPtr con::ConnectionCommand::create ( ConnectionCommandType type)
staticprivate

References ConnectionCommand(), and type.

Referenced by ack(), connect(), createPeer(), disconnect(), disconnect_peer(), resend_one(), send(), and serve().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createPeer()

ConnectionCommandPtr con::ConnectionCommand::createPeer ( session_t peer_id,
const Buffer< u8 > & data )
static

References con::CONCMD_CREATE_PEER, Buffer< T >::copyTo(), create(), data, and peer_id.

Referenced by con::Connection::createPeer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DISABLE_CLASS_COPY()

con::ConnectionCommand::DISABLE_CLASS_COPY ( ConnectionCommand )

◆ disconnect()

ConnectionCommandPtr con::ConnectionCommand::disconnect ( )
static

References con::CONNCMD_DISCONNECT, and create().

Referenced by con::Connection::Disconnect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ disconnect_peer()

ConnectionCommandPtr con::ConnectionCommand::disconnect_peer ( session_t peer_id)
static

References con::CONNCMD_DISCONNECT_PEER, create(), and peer_id.

Referenced by con::Connection::DisconnectPeer(), and con::ConnectionReceiveThread::handlePacketType_Reliable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resend_one()

ConnectionCommandPtr con::ConnectionCommand::resend_one ( session_t peer_id)
static

References con::CONNCMD_RESEND_ONE, create(), and peer_id.

Referenced by con::Connection::doResendOne().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ send()

ConnectionCommandPtr con::ConnectionCommand::send ( session_t peer_id,
u8 channelnum,
NetworkPacket * pkt,
bool reliable )
static

References channelnum, con::CONNCMD_SEND, create(), NetworkPacket::oldForgePacket(), peer_id, and reliable.

Referenced by con::Connection::Send().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serve()

ConnectionCommandPtr con::ConnectionCommand::serve ( Address address)
static

References address, con::CONNCMD_SERVE, and create().

Referenced by con::Connection::Serve().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ address

Address con::ConnectionCommand::address

◆ channelnum

u8 con::ConnectionCommand::channelnum = 0

◆ data

Buffer<u8> con::ConnectionCommand::data

◆ peer_id

◆ raw

bool con::ConnectionCommand::raw = false

◆ reliable

bool con::ConnectionCommand::reliable = false

◆ type

const ConnectionCommandType con::ConnectionCommand::type

The documentation for this struct was generated from the following files: