#include <impl.h>
◆ Connection()
con::Connection::Connection |
( |
u32 | max_packet_size, |
|
|
float | timeout, |
|
|
bool | ipv6, |
|
|
PeerHandler * | peerhandler ) |
◆ ~Connection()
con::Connection::~Connection |
( |
| ) |
|
◆ Connect()
void con::Connection::Connect |
( |
Address | address | ) |
|
|
virtual |
◆ Connected()
bool con::Connection::Connected |
( |
| ) |
|
|
virtual |
◆ ConnectedToServer()
bool con::Connection::ConnectedToServer |
( |
| ) |
|
|
inlineprotected |
◆ createPeer()
References CONTROLTYPE_SET_PEER_ID, con::ConnectionCommand::createPeer(), dout_con, errorstream, getDesc(), con::IPeer::id, LOG, m_peer_ids, m_peers, m_peers_mutex, MAX_UDP_PEERS, myrand_range(), con::PACKET_TYPE_CONTROL, PEER_ID_INEXISTENT, con::ConnectionEvent::peerAdded(), putCommand(), putEvent(), writeU16(), and writeU8().
Referenced by con::ConnectionReceiveThread::receive().
◆ createServerPeer()
◆ deletePeer()
bool con::Connection::deletePeer |
( |
session_t | peer_id, |
|
|
bool | timeout ) |
|
protected |
◆ Disconnect()
void con::Connection::Disconnect |
( |
| ) |
|
|
virtual |
◆ DisconnectPeer()
void con::Connection::DisconnectPeer |
( |
session_t | peer_id | ) |
|
|
virtual |
◆ doResendOne()
void con::Connection::doResendOne |
( |
session_t | peer_id | ) |
|
|
protected |
◆ getActiveCount()
u32 con::Connection::getActiveCount |
( |
| ) |
|
|
protected |
◆ getDesc()
const std::string con::Connection::getDesc |
( |
| ) |
|
References _, UDPSocket::GetHandle(), itos(), m_info_mutex, m_peer_id, and m_udpSocket.
Referenced by con::ConnectionReceiveThread::checkIncomingBuffers(), con::ConnectionSendThread::connect(), createPeer(), con::ConnectionSendThread::disconnect(), con::ConnectionSendThread::disconnect_peer(), con::Peer::Drop(), con::ConnectionReceiveThread::handlePacketType_Control(), con::ConnectionReceiveThread::handlePacketType_Original(), con::ConnectionReceiveThread::handlePacketType_Reliable(), con::ConnectionReceiveThread::handlePacketType_Split(), con::ConnectionSendThread::processNonReliableCommand(), con::ConnectionReceiveThread::processPacket(), con::ConnectionSendThread::processReliableCommand(), con::UDPPeer::processReliableSendCommand(), con::UDPPeer::PutReliableSendCommand(), con::ConnectionSendThread::rawSend(), con::ConnectionSendThread::rawSendAsPacket(), con::ConnectionReceiveThread::receive(), ReceiveTimeoutMs(), con::UDPPeer::reportRTT(), con::ConnectionSendThread::resendReliable(), con::ConnectionReceiveThread::run(), con::ConnectionSendThread::run(), con::UDPPeer::RunCommandQueues(), con::ConnectionSendThread::runTimeouts(), con::ConnectionSendThread::send(), sendAck(), con::ConnectionSendThread::sendAsPacketReliable(), con::ConnectionSendThread::sendPackets(), and con::ConnectionSendThread::serve().
◆ getLocalStat()
◆ GetPeerAddress()
◆ GetPeerID()
session_t con::Connection::GetPeerID |
( |
| ) |
const |
|
inlinevirtual |
◆ getPeerIDs()
std::vector< session_t > con::Connection::getPeerIDs |
( |
| ) |
|
|
inlineprotected |
◆ getPeerNoEx()
References FATAL_ERROR_IF, m_peers, and m_peers_mutex.
Referenced by ConnectedToServer(), con::ConnectionSendThread::disconnect_peer(), con::ConnectionReceiveThread::getFromBuffers(), getLocalStat(), GetPeerAddress(), getPeerStat(), con::ConnectionSendThread::packetsQueued(), con::ConnectionReceiveThread::processPacket(), con::ConnectionSendThread::processReliableCommand(), con::ConnectionSendThread::rawSendAsPacket(), con::ConnectionReceiveThread::receive(), con::ConnectionReceiveThread::run(), con::ConnectionSendThread::runTimeouts(), con::ConnectionSendThread::send(), con::ConnectionSendThread::sendPackets(), con::ConnectionSendThread::sendReliable(), and con::ConnectionSendThread::sendToAllReliable().
◆ getPeerStat()
◆ GetProtocolID()
u32 con::Connection::GetProtocolID |
( |
| ) |
const |
|
inline |
◆ lookupPeer()
◆ putCommand()
References m_command_queue, m_sendThread, m_shutting_down, and MutexedQueue< T >::push_back().
Referenced by Connect(), createPeer(), Disconnect(), DisconnectPeer(), doResendOne(), con::ConnectionReceiveThread::handlePacketType_Reliable(), Send(), sendAck(), and Serve().
◆ putEvent()
◆ ReceiveTimeoutMs()
bool con::Connection::ReceiveTimeoutMs |
( |
NetworkPacket * | pkt, |
|
|
u32 | timeout_ms ) |
|
virtual |
Implements con::IConnection.
References con::ConnectionEvent::address, con::CONNEVENT_BIND_FAILED, con::CONNEVENT_DATA_RECEIVED, con::CONNEVENT_NONE, con::CONNEVENT_PEER_ADDED, con::CONNEVENT_PEER_REMOVED, con::ConnectionEvent::data, con::PeerHandler::deletingPeer(), con::ConnectionEvent::describe(), dout_con, getDesc(), Buffer< T >::getSize(), LOG, m_bc_peerhandler, con::ConnectionEvent::peer_id, con::PeerHandler::peerAdded(), NetworkPacket::putRawPacket(), con::ConnectionEvent::timeout, con::ConnectionEvent::type, and waitEvent().
◆ Send()
◆ sendAck()
void con::Connection::sendAck |
( |
session_t | peer_id, |
|
|
u8 | channelnum, |
|
|
u16 | seqnum ) |
|
protected |
References con::ConnectionCommand::ack(), CHANNEL_COUNT, CONTROLTYPE_ACK, dout_con, getDesc(), LOG, m_sendThread, con::PACKET_TYPE_CONTROL, putCommand(), writeU16(), and writeU8().
Referenced by con::ConnectionReceiveThread::handlePacketType_Reliable().
◆ Serve()
void con::Connection::Serve |
( |
Address | bind_addr | ) |
|
|
virtual |
◆ SetPeerID()
void con::Connection::SetPeerID |
( |
session_t | id | ) |
|
|
inlineprotected |
◆ TriggerSend()
void con::Connection::TriggerSend |
( |
| ) |
|
|
protected |
◆ waitEvent()
◆ ConnectionReceiveThread
◆ ConnectionSendThread
◆ m_bc_peerhandler
◆ m_command_queue
◆ m_event_queue
◆ m_info_mutex
std::mutex con::Connection::m_info_mutex |
|
mutableprivate |
◆ m_peer_id
◆ m_peer_ids
std::vector<session_t> con::Connection::m_peer_ids |
|
private |
◆ m_peers
◆ m_peers_mutex
std::mutex con::Connection::m_peers_mutex |
|
private |
◆ m_protocol_id
u32 con::Connection::m_protocol_id |
|
private |
◆ m_receiveThread
◆ m_sendThread
◆ m_shutting_down
bool con::Connection::m_shutting_down = false |
|
private |
◆ m_udpSocket
The documentation for this class was generated from the following files: