Luanti 5.16.0-dev
Loading...
Searching...
No Matches
con::ConnectionEvent Struct Reference

#include <impl.h>

Collaboration diagram for con::ConnectionEvent:

Public Member Functions

 DISABLE_CLASS_COPY (ConnectionEvent)
const char * describe () const

Static Public Member Functions

static ConnectionEventPtr create (ConnectionEventType type)
static ConnectionEventPtr dataReceived (session_t peer_id, const Buffer< u8 > &data)
static ConnectionEventPtr peerAdded (session_t peer_id, Address address)
static ConnectionEventPtr peerRemoved (session_t peer_id, bool is_timeout, Address address)
static ConnectionEventPtr bindFailed ()

Public Attributes

const ConnectionEventType type
session_t peer_id = 0
Buffer< u8 > data
bool timeout = false
Address address

Private Member Functions

 ConnectionEvent (ConnectionEventType type_)

Constructor & Destructor Documentation

◆ ConnectionEvent()

con::ConnectionEvent::ConnectionEvent ( ConnectionEventType type_)
inlineprivate

References type.

Referenced by create(), and DISABLE_CLASS_COPY().

Here is the caller graph for this function:

Member Function Documentation

◆ bindFailed()

ConnectionEventPtr con::ConnectionEvent::bindFailed ( )
static

References con::CONNEVENT_BIND_FAILED, and create().

Referenced by con::ConnectionSendThread::serve().

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

◆ create()

ConnectionEventPtr con::ConnectionEvent::create ( ConnectionEventType type)
static

References ConnectionEvent(), and type.

Referenced by bindFailed(), dataReceived(), peerAdded(), peerRemoved(), and con::Connection::waitEvent().

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

◆ dataReceived()

ConnectionEventPtr con::ConnectionEvent::dataReceived ( session_t peer_id,
const Buffer< u8 > & data )
static

References con::CONNEVENT_DATA_RECEIVED, create(), data, and peer_id.

Referenced by con::ConnectionReceiveThread::receive().

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

◆ describe()

const char * con::ConnectionEvent::describe ( ) const

References con::CONNEVENT_BIND_FAILED, con::CONNEVENT_DATA_RECEIVED, con::CONNEVENT_NONE, con::CONNEVENT_PEER_ADDED, con::CONNEVENT_PEER_REMOVED, and type.

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

Here is the caller graph for this function:

◆ DISABLE_CLASS_COPY()

con::ConnectionEvent::DISABLE_CLASS_COPY ( ConnectionEvent )

References ConnectionEvent(), address, data, peer_id, and type.

Here is the call graph for this function:

◆ peerAdded()

ConnectionEventPtr con::ConnectionEvent::peerAdded ( session_t peer_id,
Address address )
static

References address, con::CONNEVENT_PEER_ADDED, create(), and peer_id.

Referenced by con::ConnectionSendThread::connect(), and con::Connection::createPeer().

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

◆ peerRemoved()

ConnectionEventPtr con::ConnectionEvent::peerRemoved ( session_t peer_id,
bool is_timeout,
Address address )
static

References address, con::CONNEVENT_PEER_REMOVED, create(), and peer_id.

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

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

Member Data Documentation

◆ address

Address con::ConnectionEvent::address

◆ data

Buffer<u8> con::ConnectionEvent::data

◆ peer_id

◆ timeout

bool con::ConnectionEvent::timeout = false

◆ type


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