Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
con::IConnection Class Referenceabstract

#include <connection.h>

+ Inheritance diagram for con::IConnection:

Public Member Functions

virtual ~IConnection ()=default
 
virtual void Serve (Address bind_addr)=0
 
virtual void Connect (Address address)=0
 
virtual bool Connected ()=0
 
virtual void Disconnect ()=0
 
virtual void DisconnectPeer (session_t peer_id)=0
 
virtual bool ReceiveTimeoutMs (NetworkPacket *pkt, u32 timeout_ms)=0
 
bool TryReceive (NetworkPacket *pkt)
 
virtual void Send (session_t peer_id, u8 channelnum, NetworkPacket *pkt, bool reliable)=0
 
virtual session_t GetPeerID () const =0
 
virtual Address GetPeerAddress (session_t peer_id)=0
 
virtual float getPeerStat (session_t peer_id, rtt_stat_type type)=0
 
virtual float getLocalStat (rate_stat_type type)=0
 

Constructor & Destructor Documentation

◆ ~IConnection()

virtual con::IConnection::~IConnection ( )
virtualdefault

Member Function Documentation

◆ Connect()

virtual void con::IConnection::Connect ( Address address)
pure virtual

Implemented in con::Connection.

Referenced by Client::connect().

+ Here is the caller graph for this function:

◆ Connected()

virtual bool con::IConnection::Connected ( )
pure virtual

Implemented in con::Connection.

◆ Disconnect()

virtual void con::IConnection::Disconnect ( )
pure virtual

Implemented in con::Connection.

Referenced by Client::~Client(), and Client::handleCommand_Hello().

+ Here is the caller graph for this function:

◆ DisconnectPeer()

virtual void con::IConnection::DisconnectPeer ( session_t peer_id)
pure virtual

Implemented in con::Connection.

Referenced by Server::DisconnectPeer(), and ClientInterface::step().

+ Here is the caller graph for this function:

◆ getLocalStat()

virtual float con::IConnection::getLocalStat ( rate_stat_type type)
pure virtual

Implemented in con::Connection.

Referenced by Client::getCurRate().

+ Here is the caller graph for this function:

◆ GetPeerAddress()

virtual Address con::IConnection::GetPeerAddress ( session_t peer_id)
pure virtual

Implemented in con::Connection.

Referenced by Client::getServerAddress(), Server::handleCommand_Init(), and ClientInterface::step().

+ Here is the caller graph for this function:

◆ GetPeerID()

virtual session_t con::IConnection::GetPeerID ( ) const
pure virtual

Implemented in con::Connection.

◆ getPeerStat()

virtual float con::IConnection::getPeerStat ( session_t peer_id,
rtt_stat_type type )
pure virtual

Implemented in con::Connection.

Referenced by Server::getClientConInfo(), and Client::getRTT().

+ Here is the caller graph for this function:

◆ ReceiveTimeoutMs()

virtual bool con::IConnection::ReceiveTimeoutMs ( NetworkPacket * pkt,
u32 timeout_ms )
pure virtual

Implemented in con::Connection.

Referenced by Server::Receive(), and TryReceive().

+ Here is the caller graph for this function:

◆ Send()

virtual void con::IConnection::Send ( session_t peer_id,
u8 channelnum,
NetworkPacket * pkt,
bool reliable )
pure virtual

Implemented in con::Connection.

Referenced by Client::Send(), ClientInterface::send(), ClientInterface::sendCustom(), and ClientInterface::sendToAll().

+ Here is the caller graph for this function:

◆ Serve()

virtual void con::IConnection::Serve ( Address bind_addr)
pure virtual

Implemented in con::Connection.

Referenced by Server::start().

+ Here is the caller graph for this function:

◆ TryReceive()

bool con::IConnection::TryReceive ( NetworkPacket * pkt)
inline

References ReceiveTimeoutMs().

Referenced by Client::ReceiveAll().

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

The documentation for this class was generated from the following file: