#include <C4Network2IO.h>
Classes | |
struct | AutoAccept |
struct | NetEvPacketData |
Protected Member Functions | |
bool | IsPuncherAddr (const C4NetIO::addr_t &addr) const |
bool | OnConn (const C4NetIO::addr_t &addr, const C4NetIO::addr_t &AddrConnect, const C4NetIO::addr_t *pOwnAddr, C4NetIO *pNetIO) override |
void | OnDisconn (const C4NetIO::addr_t &addr, C4NetIO *pNetIO, const char *szReason) override |
void | OnPacket (const C4NetIOPacket &rPacket, C4NetIO *pNetIO) override |
virtual void | OnError (const char *strError, C4NetIO *pNetIO) |
bool | Execute (int iTimeout, pollfd *) override |
C4TimeMilliseconds | GetNextTick (C4TimeMilliseconds tNow) override |
void | OnThreadEvent (C4InteractiveEventType eEvent, void *pEventData) override |
void | AddConnection (C4Network2IOConnection *pConn) |
void | RemoveConnection (C4Network2IOConnection *pConn) |
C4Network2IOConnection * | GetConnection (const C4NetIO::addr_t &addr, C4NetIO *pNetIO) |
C4Network2IOConnection * | GetConnectionByConnAddr (const C4NetIO::addr_t &addr, C4NetIO *pNetIO) |
C4Network2IOConnection * | GetConnectionByID (uint32_t iConnID) |
bool | doAutoAccept (const C4ClientCore &CCore, const C4Network2IOConnection &Conn) |
bool | HandlePacket (const C4NetIOPacket &rPacket, C4Network2IOConnection *pConn, bool fThread) |
void | CallHandlers (int iHandlers, const class C4IDPacket *pPacket, C4Network2IOConnection *pConn, bool fThread) |
void | HandlePacket (char cStatus, const C4PacketBase *pPacket, C4Network2IOConnection *pConn) |
void | HandleFwdReq (const class C4PacketFwd &rFwd, C4Network2IOConnection *pBy) |
void | HandlePuncherPacket (const C4NetIOPacket &rPacket) |
bool | Ping () |
void | CheckTimeout () |
void | GenerateStatistics (int iInterval) |
void | SendConnPackets () |
virtual void | OnPacket (const class C4NetIOPacket &rPacket, C4NetIO *pNetIO)=0 |
void | Changed () |
bool | ExecuteUntil (int iTimeout=-1) |
virtual void | GetFDs (std::vector< struct pollfd > &) |
bool | IsSignaled () |
virtual bool | IsLowPriority () |
virtual bool | IsNotify () |
virtual uint32_t | TimerInterval () |
Protected Attributes | |
C4NetIO * | pNetIO_TCP {nullptr} |
C4NetIO * | pNetIO_UDP {nullptr} |
class C4Network2IODiscover * | pNetIODiscover {nullptr} |
class C4Network2RefServer * | pRefServer {nullptr} |
class C4Network2UPnP * | UPnPMgr {nullptr} |
C4ClientCore | LCCore |
CStdCSec | LCCoreCSec |
C4Network2IOConnection * | pConnList {nullptr} |
CStdCSec | ConnListCSec |
CStdCSec | BroadcastCSec |
uint32_t | iNextConnID {0} |
bool | fAllowConnect {false} |
struct C4Network2IO::AutoAccept | nullptr |
CStdCSec | AutoAcceptCSec |
bool | fExclusiveConn {false} |
C4TimeMilliseconds | tLastExecute |
C4TimeMilliseconds | tLastPing |
C4TimeMilliseconds | tLastStatistic |
int | iTCPIRate {0} |
int | iTCPORate {0} |
int | iTCPBCRate {0} |
int | iUDPIRate {0} |
int | iUDPORate {0} |
int | iUDPBCRate {0} |
C4NetIO::addr_t | PuncherAddrIPv4 |
C4NetIO::addr_t | PuncherAddrIPv6 |
Definition at line 43 of file C4Network2IO.h.
struct C4Network2IO::AutoAccept |
Definition at line 81 of file C4Network2IO.h.
Class Members | ||
---|---|---|
C4ClientCore | CCore | |
AutoAccept * | Next |
struct C4Network2IO::NetEvPacketData |
Definition at line 32 of file C4Network2IO.cpp.
Class Members | ||
---|---|---|
C4Network2IOConnection * | Conn | |
C4NetIOPacket | Packet |
C4Network2IO::C4Network2IO | ( | ) |
Definition at line 43 of file C4Network2IO.cpp.
|
override |
Definition at line 48 of file C4Network2IO.cpp.
References Clear().
void C4Network2IO::AddAutoAccept | ( | const C4ClientCore & | CCore | ) |
Definition at line 320 of file C4Network2IO.cpp.
References AutoAcceptCSec, C4Network2IO::AutoAccept::CCore, and C4Network2IO::AutoAccept::Next.
Referenced by C4Network2ClientList::RegClient().
|
protected |
Definition at line 738 of file C4Network2IO.cpp.
References C4Network2IOConnection::AddRef(), ConnListCSec, pConnList, and C4Network2IOConnection::pNext.
Referenced by ConnectWithSocket(), and OnConn().
void C4Network2IO::BeginBroadcast | ( | bool | fSelectAll = false | ) |
Definition at line 382 of file C4Network2IO.cpp.
References BroadcastCSec, ConnListCSec, CStdCSec::Enter(), pConnList, and C4Network2IOConnection::pNext.
Referenced by BroadcastMsg(), C4Network2ClientList::BroadcastMsgToClients(), C4Network2ClientList::BroadcastMsgToConnClients(), and HandleFwdReq().
bool C4Network2IO::Broadcast | ( | const C4NetIOPacket & | rPkt | ) |
Definition at line 399 of file C4Network2IO.cpp.
References ConnListCSec, Log(), pConnList, and C4Network2IOConnection::pNext.
Referenced by BroadcastMsg(), C4Network2ClientList::BroadcastMsgToClients(), C4Network2ClientList::BroadcastMsgToConnClients(), and HandleFwdReq().
bool C4Network2IO::BroadcastMsg | ( | const C4NetIOPacket & | rPkt | ) |
Definition at line 423 of file C4Network2IO.cpp.
References BeginBroadcast(), Broadcast(), ConnListCSec, C4Network2IOConnection::DelRef(), EndBroadcast(), GetMsgConnection(), P_TCP, P_UDP, pConnList, and C4Network2IOConnection::pNext.
Referenced by C4Network2Res::FinishDerive(), C4Network2ResList::SendDiscover(), and C4Network2Res::SendStatus().
|
protected |
Definition at line 931 of file C4Network2IO.cpp.
References C4Network2::Clients, Control, C4IDPacket::getPkt(), C4IDPacket::getPktType(), C4Network2::HandleLobbyPacket(), C4Network2::HandlePacket(), C4Network2ClientList::HandlePacket(), C4GameControlNetwork::HandlePacket(), C4Network2ResList::HandlePacket(), C4Network2Players::HandlePacket(), HandlePacket(), Network, C4GameControl::Network, PH_C4GameControlNetwork, PH_C4GUIMainDlg, PH_C4Network2, PH_C4Network2ClientList, PH_C4Network2IO, PH_C4Network2Players, PH_C4Network2ResList, C4Network2::Players, and C4Network2::ResList.
Referenced by HandlePacket().
|
protectedinherited |
Definition at line 108 of file StdScheduler.cpp.
References s.
Referenced by C4NetIOTCP::Accept(), C4NetIOTCP::AddConnectWait(), C4NetIOUDP::AddPeer(), C4NetIOTCP::Listen(), and CStdTimerProc::SetDelay().
|
protected |
Definition at line 1186 of file C4Network2IO.cpp.
References Application, C4NetAcceptTimeout, C4NetPingTimeout, ConnListCSec, C4Application::InteractiveThread, pConnList, RemoveConnection(), and C4InteractiveThread::ThreadLogS().
Referenced by Execute().
void C4Network2IO::Clear | ( | ) |
Definition at line 177 of file C4Network2IO.cpp.
References Application, CStdLock::Clear(), ClearAutoAccept(), C4InteractiveThread::ClearCallback(), ConnListCSec, Ev_Net_Conn, Ev_Net_Disconn, Ev_Net_Packet, fAllowConnect, fExclusiveConn, iNextConnID, C4Application::InteractiveThread, pConnList, pNetIO_TCP, pNetIO_UDP, pNetIODiscover, pRefServer, C4InteractiveThread::ProcessEvents(), RemoveConnection(), C4InteractiveThread::RemoveProc(), and UPnPMgr.
Referenced by C4Network2::Clear(), Init(), C4Network2::InitNetIO(), and ~C4Network2IO().
void C4Network2IO::ClearAutoAccept | ( | ) |
Definition at line 306 of file C4Network2IO.cpp.
References AutoAcceptCSec, and C4Network2IO::AutoAccept::Next.
Referenced by Clear().
bool C4Network2IO::Connect | ( | const C4NetIO::addr_t & | addr, |
C4Network2IOProtocol | eProt, | ||
const C4ClientCore & | nCCore, | ||
const char * | szPassword = nullptr |
||
) |
Definition at line 233 of file C4Network2IO.cpp.
References ConnectWithSocket().
Referenced by C4Network2Client::DoConnectAttempt().
bool C4Network2IO::ConnectWithSocket | ( | const C4NetIO::addr_t & | addr, |
C4Network2IOProtocol | eProt, | ||
const C4ClientCore & | nCCore, | ||
std::unique_ptr< C4NetIOTCP::Socket > | socket, | ||
const char * | szPassword = nullptr |
||
) |
Definition at line 239 of file C4Network2IO.cpp.
References AddConnection(), C4Network2IOConnection::Connect(), CS_Connect, GetConnectionByConnAddr(), StdStrBuf::getData(), C4NetIO::GetError(), getNetIO(), getNetIOName(), iNextConnID, LogSilentF(), RemoveConnection(), C4NetIO::ResetError(), C4Network2IOConnection::Set(), C4Network2IOConnection::SetCCore(), C4Network2IOConnection::SetSocket(), and C4NetIO::EndpointAddress::ToString().
Referenced by Connect(), and C4Network2Client::DoTCPSimultaneousOpen().
C4NetIO * C4Network2IO::DataIO | ( | ) |
Definition at line 226 of file C4Network2IO.cpp.
References pNetIO_TCP, and pNetIO_UDP.
Referenced by C4Network2::DrawStatus(), and C4Network2::HandleConnRe().
|
protected |
Definition at line 811 of file C4Network2IO.cpp.
References AutoAcceptCSec, C4ClientCoreDL_IDMatch, C4ClientCore::getDiffLevel(), C4NetIO::EndpointAddress::GetHost(), C4Network2IOConnection::getPeerAddr(), C4Network2IO::AutoAccept::Next, pConnList, and C4Network2IOConnection::pNext.
Referenced by HandlePacket().
void C4Network2IO::EndBroadcast | ( | ) |
Definition at line 393 of file C4Network2IO.cpp.
References BroadcastCSec, and CStdCSec::Leave().
Referenced by BroadcastMsg(), C4Network2ClientList::BroadcastMsgToClients(), C4Network2ClientList::BroadcastMsgToConnClients(), and HandleFwdReq().
|
overrideprotectedvirtual |
Implements StdSchedulerProc.
Definition at line 637 of file C4Network2IO.cpp.
References C4NetPingFreq, C4NetStatisticsFreq, CheckTimeout(), GenerateStatistics(), Inside(), Network, C4TimeMilliseconds::Now(), C4Network2ResList::OnTimer(), Ping(), C4Network2::ResList, tLastExecute, tLastPing, and tLastStatistic.
|
inherited |
Definition at line 33 of file StdScheduler.cpp.
References StdSchedulerProc::Execute(), and C4TimeMilliseconds::Now().
Referenced by main().
|
protected |
Definition at line 1217 of file C4Network2IO.cpp.
References CStdLock::Clear(), C4NetIO::ClearStatistic(), ConnListCSec, C4NetIO::GetStatistic(), iTCPBCRate, iTCPIRate, iTCPORate, iUDPBCRate, iUDPIRate, iUDPORate, pConnList, pNetIO_TCP, pNetIO_UDP, and C4Network2IOConnection::pNext.
Referenced by Execute().
|
protected |
Definition at line 768 of file C4Network2IO.cpp.
References ConnListCSec, pConnList, and C4Network2IOConnection::pNext.
Referenced by OnDisconn(), and OnPacket().
|
protected |
Definition at line 778 of file C4Network2IO.cpp.
References ConnListCSec, pConnList, and C4Network2IOConnection::pNext.
Referenced by ConnectWithSocket(), OnConn(), and OnDisconn().
|
protected |
Definition at line 788 of file C4Network2IO.cpp.
References ConnListCSec, pConnList, and C4Network2IOConnection::pNext.
Referenced by HandlePacket().
int C4Network2IO::getConnectionCount | ( | ) |
Definition at line 296 of file C4Network2IO.cpp.
References ConnListCSec, pConnList, and C4Network2IOConnection::pNext.
Referenced by C4Network2::OnDisconn().
C4Network2IOConnection * C4Network2IO::GetDataConnection | ( | int | iClientID | ) |
Definition at line 368 of file C4Network2IO.cpp.
References C4Network2IOConnection::AddRef(), ConnListCSec, P_TCP, pConnList, and C4Network2IOConnection::pNext.
Referenced by C4Network2Res::SendChunk().
|
inlinevirtualinherited |
Reimplemented in C4FileMonitor, C4NetIOSimpleUDP, C4NetIOTCP, CStdNotifyProc, C4StdInProc, and C4HTTPClient.
Definition at line 72 of file StdScheduler.h.
C4Network2IOConnection * C4Network2IO::GetMsgConnection | ( | int | iClientID | ) |
Definition at line 354 of file C4Network2IO.cpp.
References C4Network2IOConnection::AddRef(), ConnListCSec, P_UDP, pConnList, and C4Network2IOConnection::pNext.
Referenced by BroadcastMsg(), HandleFwdReq(), SendMsgToClient(), and C4Network2Res::StartLoad().
C4NetIO * C4Network2IO::getNetIO | ( | C4Network2IOProtocol | eProt | ) |
Definition at line 712 of file C4Network2IO.cpp.
References P_TCP, P_UDP, pNetIO_TCP, and pNetIO_UDP.
Referenced by ConnectWithSocket(), C4Network2Client::DoConnectAttempt(), and C4Network2Client::DoTCPSimultaneousOpen().
const char * C4Network2IO::getNetIOName | ( | C4NetIO * | pNetIO | ) |
Definition at line 722 of file C4Network2IO.cpp.
References pNetIO_TCP, and pNetIO_UDP.
Referenced by ConnectWithSocket(), C4Network2::DrawStatus(), OnConn(), C4Network2::OnConnect(), C4Network2::OnConnectFail(), OnDisconn(), C4Network2::OnDisconnect(), OnError(), OnPacket(), and C4Network2ClientDlg::UpdateText().
C4Network2IOProtocol C4Network2IO::getNetIOProt | ( | C4NetIO * | pNetIO | ) |
Definition at line 730 of file C4Network2IO.cpp.
References P_NONE, P_TCP, P_UDP, pNetIO_TCP, and pNetIO_UDP.
Referenced by C4Network2::DrawStatus(), and OnConn().
|
overrideprotectedvirtual |
Reimplemented from StdSchedulerProc.
Definition at line 665 of file C4Network2IO.cpp.
References C4NetTimer, and tLastExecute.
|
inline |
Definition at line 155 of file C4Network2IO.h.
References iTCPBCRate, iUDPBCRate, and P_TCP.
Referenced by C4Network2::DrawStatus().
|
inline |
Definition at line 153 of file C4Network2IO.h.
References iTCPIRate, iUDPIRate, and P_TCP.
Referenced by C4Network2::DrawStatus(), and C4Network2Stats::ExecuteSecond().
|
inline |
Definition at line 154 of file C4Network2IO.h.
References iTCPORate, iUDPORate, and P_TCP.
Referenced by C4Network2::DrawStatus(), and C4Network2Stats::ExecuteSecond().
|
protected |
Definition at line 1105 of file C4Network2IO.cpp.
References C4PacketFwd::AddClient(), BeginBroadcast(), Broadcast(), CStdLock::Clear(), ConnListCSec, C4Network2IOConnection::DelRef(), C4PacketFwd::DoFwdTo(), EndBroadcast(), C4PacketFwd::getClient(), C4PacketFwd::getClientCnt(), C4Network2IOConnection::getClientID(), C4PacketFwd::getData(), C4ClientCore::getID(), GetMsgConnection(), C4Network2IOConnection::getPeerAddr(), HandlePacket(), C4Network2IOConnection::isAccepted(), LCCore, MkC4NetIOPacket(), pConnList, PID_Fwd, C4Network2IOConnection::pNext, C4Network2IOConnection::Send(), C4Network2IOConnection::SetBroadcastTarget(), C4PacketFwd::SetData(), and C4PacketFwd::SetListType().
Referenced by HandlePacket().
|
protected |
Definition at line 979 of file C4Network2IO.cpp.
References Application, C4Network2IOConnection::ClearPacketLog(), C4Network2IOConnection::Close(), CS_HalfAccepted, doAutoAccept(), GetConnectionByID(), C4ClientCore::getID(), C4Network2IOConnection::getInPacketCounter(), C4Network2IOConnection::getPeerAddr(), GETPKT, HandleFwdReq(), HandlePacket(), C4Application::InteractiveThread, C4Network2IOConnection::isAutoAccepted(), C4Network2IOConnection::isClosed(), C4Network2IOConnection::isConnSent(), C4Network2IOConnection::isHalfAccepted(), C4Network2IOConnection::isOpen(), LCCore, MkC4NetIOPacket(), PID_Conn, PID_ConnRe, PID_Fwd, PID_FwdReq, PID_Ping, PID_Pong, PID_PostMortem, RemoveConnection(), C4Network2IOConnection::Send(), C4Network2IOConnection::SetAccepted(), C4Network2IOConnection::SetAutoAccepted(), C4Network2IOConnection::SetCCore(), C4Network2IOConnection::SetPingTime(), C4Network2IOConnection::SetRemoteID(), C4Network2IOConnection::SetStatus(), and C4InteractiveThread::ThreadLogS().
|
protected |
Definition at line 831 of file C4Network2IO.cpp.
References C4Network2IOConnection::AddRef(), Application, CallHandlers(), C4Network2IOConnection::Close(), Config, C4Network2IO::NetEvPacketData::Conn, C4Network2IOConnection::DelRef(), C4NetIOPacket::Duplicate(), Ev_LogSilent, Ev_Net_Packet, FormatString(), StdStrBuf::getData(), C4Network2IOConnection::getInPacketCounter(), C4Network2IOConnection::getPeerAddr(), C4IDPacket::getPktType(), StdBuf::getSize(), C4NetIOPacket::getStatus(), StdStrBuf::GrabPointer(), C4PktHandlingData::ID, C4Application::InteractiveThread, C4Network2IOConnection::isAccepted(), C4Network2IOConnection::isClosed(), C4Network2IOConnection::isHalfAccepted(), mkNamingAdapt(), StdCompiler::Exception::Msg, C4Config::Network, C4TimeMilliseconds::Now(), C4Network2IO::NetEvPacketData::Packet, C4ConfigNetwork::PacketLogging, PID_Conn, PID_ConnRe, PID_NetResData, PID_None, PID_Ping, PID_Pong, PktHandlingData, C4InteractiveThread::PushEvent(), StdBuf::Take(), C4InteractiveThread::ThreadLog(), C4InteractiveThread::ThreadLogS(), C4NetIO::EndpointAddress::ToString(), and C4PacketBase::unpack().
Referenced by CallHandlers(), HandleFwdReq(), HandlePacket(), OnPacket(), and OnThreadEvent().
|
protected |
Definition at line 1161 of file C4Network2IO.cpp.
References C4NetIO::Close(), C4NetpuncherPacket::Construct(), C4NetIOPacket::getAddr(), C4NetIO::HostAddress::GetFamily(), C4Network2::HandlePuncherPacket(), Network, and pNetIO_UDP.
Referenced by OnPacket().
|
inline |
Definition at line 107 of file C4Network2IO.h.
References pNetIO_TCP.
Referenced by C4Network2::InitNetIO().
|
inline |
Definition at line 108 of file C4Network2IO.h.
References pNetIO_UDP.
Referenced by C4Network2::InitNetIO().
bool C4Network2IO::Init | ( | int16_t | iPortTCP, |
int16_t | iPortUDP, | ||
int16_t | iPortDiscovery = -1 , |
||
int16_t | iPortRefServer = -1 , |
||
bool | fBroadcast = false , |
||
bool | enable_upnp = true |
||
) |
Definition at line 53 of file C4Network2IO.cpp.
References C4Network2UPnP::AddMapping(), C4InteractiveThread::AddProc(), Application, Clear(), C4InteractiveThread::ClearCallback(), Ev_Net_Conn, Ev_Net_Disconn, Ev_Net_Packet, C4NetIO::GetError(), C4NetIOTCP::Init(), C4NetIO::Init(), C4Network2IODiscover::Init(), C4Application::InteractiveThread, iTCPBCRate, iTCPIRate, iTCPORate, iUDPBCRate, iUDPIRate, iUDPORate, LogF(), LogFatal(), LogSilentF(), C4TimeMilliseconds::Now(), P_TCP, P_UDP, pNetIO_TCP, pNetIO_UDP, pNetIODiscover, pRefServer, C4InteractiveThread::SetCallback(), C4NetIO::SetCallback(), C4Network2IODiscover::SetDiscoverable(), tLastExecute, tLastPing, tLastStatistic, and UPnPMgr.
Referenced by C4Network2::InitNetIO().
bool C4Network2IO::InitPuncher | ( | C4NetIO::addr_t | PuncherAddr | ) |
Definition at line 452 of file C4Network2IO.cpp.
References C4NetIO::Connect(), C4NetIO::HostAddress::GetFamily(), C4NetIO::HostAddress::IPv4, C4NetIO::HostAddress::IPv6, pNetIO_UDP, PuncherAddrIPv4, PuncherAddrIPv6, and C4NetIO::HostAddress::UnknownFamily.
Referenced by C4Network2::InitPuncher().
|
inlinevirtualinherited |
Definition at line 82 of file StdScheduler.h.
|
inlinevirtualinherited |
Reimplemented in CStdNotifyProc, and C4NetIO.
Definition at line 83 of file StdScheduler.h.
|
protected |
Definition at line 490 of file C4Network2IO.cpp.
References C4NetIO::EndpointAddress::IsNull(), PuncherAddrIPv4, and PuncherAddrIPv6.
Referenced by OnConn(), OnDisconn(), and OnPacket().
bool C4Network2IO::IsReferenceNeeded | ( | ) |
Definition at line 806 of file C4Network2IO.cpp.
References pRefServer.
Referenced by C4Network2::Execute().
|
inherited |
C4NetIO * C4Network2IO::MsgIO | ( | ) |
Definition at line 219 of file C4Network2IO.cpp.
References pNetIO_TCP, and pNetIO_UDP.
Referenced by C4Network2::DrawStatus(), and C4Network2::HandleConnRe().
|
overrideprotectedvirtual |
Reimplemented from C4NetIO::CBClass.
Definition at line 497 of file C4Network2IO.cpp.
References AddConnection(), Application, CS_Connected, fAllowConnect, GetConnectionByConnAddr(), StdStrBuf::getData(), getNetIOName(), getNetIOProt(), iNextConnID, C4Application::InteractiveThread, C4Network2IOConnection::isClosed(), C4NetIO::EndpointAddress::IsNull(), C4Network2IOConnection::isOpen(), IsPuncherAddr(), Network, C4TimeMilliseconds::Now(), C4Network2::OnPuncherConnect(), pNetIO_UDP, SendConnPackets(), C4Network2IOConnection::Set(), C4Network2IOConnection::SetPeerAddr(), C4Network2IOConnection::SetStatus(), C4InteractiveThread::ThreadLogS(), and C4NetIO::EndpointAddress::ToString().
|
overrideprotectedvirtual |
Reimplemented from C4NetIO::CBClass.
Definition at line 553 of file C4Network2IO.cpp.
References C4Network2IOConnection::AddRef(), Application, C4NetIO::EndpointAddress::Clear(), CS_Closed, CS_ConnectFail, Ev_Net_Disconn, GetConnection(), GetConnectionByConnAddr(), StdStrBuf::getData(), getNetIOName(), C4Application::InteractiveThread, C4Network2IOConnection::isClosed(), C4Network2IOConnection::isConnecting(), C4Network2IOConnection::isHalfAccepted(), IsPuncherAddr(), C4TimeMilliseconds::Now(), pNetIO_UDP, PuncherAddrIPv4, PuncherAddrIPv6, C4InteractiveThread::PushEvent(), SendConnPackets(), C4Network2IOConnection::SetStatus(), C4InteractiveThread::ThreadLogS(), and C4NetIO::EndpointAddress::ToString().
|
protectedvirtual |
Definition at line 631 of file C4Network2IO.cpp.
References Application, getNetIOName(), C4Application::InteractiveThread, and C4InteractiveThread::ThreadLog().
|
overrideprotected |
Definition at line 591 of file C4Network2IO.cpp.
References Application, C4NetIOPacket::getAddr(), GetConnection(), StdStrBuf::getData(), getNetIOName(), StdBuf::getSize(), C4NetIOPacket::getStatus(), HandlePacket(), HandlePuncherPacket(), C4Application::InteractiveThread, IsPuncherAddr(), C4TimeMilliseconds::Now(), C4Network2IOConnection::OnPacketReceived(), pNetIO_UDP, C4InteractiveThread::ThreadLog(), C4InteractiveThread::ThreadLogS(), and C4NetIO::EndpointAddress::ToString().
|
pure virtualinherited |
Implemented in C4Network2IODiscoverClient, C4Network2IODiscover, C4NetIO::CBProxy< T >, and MyCBClass.
Referenced by C4NetIOSimpleUDP::Execute(), and C4NetIOTCP::UnpackPacket().
|
overrideprotectedvirtual |
Implements C4InteractiveThread::Callback.
Definition at line 670 of file C4Network2IO.cpp.
References C4Network2IO::NetEvPacketData::Conn, C4Network2IOConnection::DelRef(), Ev_Net_Conn, Ev_Net_Disconn, Ev_Net_Packet, HandlePacket(), C4Network2IOConnection::isClosed(), Network, C4Network2::OnConn(), C4Network2::OnDisconn(), and C4Network2IO::NetEvPacketData::Packet.
|
protected |
Definition at line 1172 of file C4Network2IO.cpp.
References MkC4NetIOPacket(), pConnList, PID_Ping, and C4Network2IOConnection::pNext.
Referenced by Execute().
void C4Network2IO::Punch | ( | const C4NetIO::addr_t & | punchee_addr | ) |
Definition at line 473 of file C4Network2IO.cpp.
References MkC4NetIOPacket(), PID_Pong, and pNetIO_UDP.
Referenced by C4Network2::HandlePuncherPacket().
void C4Network2IO::RemoveAutoAccept | ( | const C4ClientCore & | CCore | ) |
Definition at line 331 of file C4Network2IO.cpp.
References AutoAcceptCSec, C4ClientCoreDL_IDMatch, C4Network2IO::AutoAccept::CCore, C4ClientCore::getDiffLevel(), and C4Network2IO::AutoAccept::Next.
Referenced by C4Network2ClientList::DeleteClient().
|
protected |
Definition at line 747 of file C4Network2IO.cpp.
References ConnListCSec, C4Network2IOConnection::DelRef(), pConnList, and C4Network2IOConnection::pNext.
Referenced by CheckTimeout(), Clear(), ConnectWithSocket(), and HandlePacket().
|
protected |
Definition at line 1254 of file C4Network2IO.cpp.
References CStdLock::Clear(), ConnListCSec, fExclusiveConn, C4ClientCore::getID(), LCCore, LCCoreCSec, MkC4NetIOPacket(), pConnList, PID_Conn, and C4Network2IOConnection::pNext.
Referenced by OnConn(), OnDisconn(), and SetExclusiveConnMode().
bool C4Network2IO::SendMsgToClient | ( | C4NetIOPacket & | rPkt, |
int | iClient | ||
) |
Definition at line 412 of file C4Network2IO.cpp.
References C4Network2IOConnection::DelRef(), GetMsgConnection(), and C4Network2IOConnection::Send().
void C4Network2IO::SendPuncherPacket | ( | const C4NetpuncherPacket & | p, |
C4NetIO::HostAddress::AddressFamily | family | ||
) |
Definition at line 481 of file C4Network2IO.cpp.
References C4NetIO::HostAddress::IPv4, C4NetIO::HostAddress::IPv6, C4NetIO::EndpointAddress::IsNull(), C4NetpuncherPacket::PackTo(), pNetIO_UDP, PuncherAddrIPv4, PuncherAddrIPv6, and C4NetIO::Send().
Referenced by C4Network2::OnPuncherConnect().
void C4Network2IO::SetAcceptMode | ( | bool | fAcceptAll | ) |
Definition at line 271 of file C4Network2IO.cpp.
References C4Network2IODiscover::Announce(), fAllowConnect, pNetIODiscover, and C4Network2IODiscover::SetDiscoverable().
Referenced by C4Network2::InitHost().
void C4Network2IO::SetExclusiveConnMode | ( | bool | fExclusiveConn | ) |
Definition at line 285 of file C4Network2IO.cpp.
References fExclusiveConn, and SendConnPackets().
void C4Network2IO::SetLocalCCore | ( | const C4ClientCore & | CCore | ) |
Definition at line 213 of file C4Network2IO.cpp.
References LCCore, and LCCoreCSec.
Referenced by C4Network2::HandleJoinData(), and C4Network2::InitNetIO().
void C4Network2IO::SetReference | ( | class C4Network2Reference * | pReference | ) |
Definition at line 798 of file C4Network2IO.cpp.
References pRefServer, and C4Network2RefServer::SetReference().
Referenced by C4Network2::Execute().
|
inlinevirtualinherited |
|
protected |
Definition at line 87 of file C4Network2IO.h.
Referenced by AddAutoAccept(), ClearAutoAccept(), doAutoAccept(), and RemoveAutoAccept().
|
protected |
Definition at line 72 of file C4Network2IO.h.
Referenced by BeginBroadcast(), and EndBroadcast().
|
protected |
Definition at line 72 of file C4Network2IO.h.
Referenced by AddConnection(), BeginBroadcast(), Broadcast(), BroadcastMsg(), CheckTimeout(), Clear(), GenerateStatistics(), GetConnection(), GetConnectionByConnAddr(), GetConnectionByID(), getConnectionCount(), GetDataConnection(), GetMsgConnection(), HandleFwdReq(), RemoveConnection(), and SendConnPackets().
|
protected |
Definition at line 78 of file C4Network2IO.h.
Referenced by Clear(), OnConn(), and SetAcceptMode().
|
protected |
Definition at line 90 of file C4Network2IO.h.
Referenced by Clear(), SendConnPackets(), and SetExclusiveConnMode().
|
protected |
Definition at line 75 of file C4Network2IO.h.
Referenced by Clear(), ConnectWithSocket(), and OnConn().
|
protected |
Definition at line 98 of file C4Network2IO.h.
Referenced by GenerateStatistics(), getProtBCRate(), and Init().
|
protected |
Definition at line 98 of file C4Network2IO.h.
Referenced by GenerateStatistics(), getProtIRate(), and Init().
|
protected |
Definition at line 98 of file C4Network2IO.h.
Referenced by GenerateStatistics(), getProtORate(), and Init().
|
protected |
Definition at line 99 of file C4Network2IO.h.
Referenced by GenerateStatistics(), getProtBCRate(), and Init().
|
protected |
Definition at line 99 of file C4Network2IO.h.
Referenced by GenerateStatistics(), getProtIRate(), and Init().
|
protected |
Definition at line 99 of file C4Network2IO.h.
Referenced by GenerateStatistics(), getProtORate(), and Init().
|
protected |
Definition at line 67 of file C4Network2IO.h.
Referenced by HandleFwdReq(), HandlePacket(), SendConnPackets(), and SetLocalCCore().
|
protected |
Definition at line 68 of file C4Network2IO.h.
Referenced by SendConnPackets(), and SetLocalCCore().
|
protected |
|
protected |
Definition at line 71 of file C4Network2IO.h.
Referenced by AddConnection(), BeginBroadcast(), Broadcast(), BroadcastMsg(), CheckTimeout(), Clear(), doAutoAccept(), GenerateStatistics(), GetConnection(), GetConnectionByConnAddr(), GetConnectionByID(), getConnectionCount(), GetDataConnection(), GetMsgConnection(), HandleFwdReq(), Ping(), RemoveConnection(), and SendConnPackets().
Definition at line 55 of file C4Network2IO.h.
Referenced by Clear(), DataIO(), GenerateStatistics(), getNetIO(), getNetIOName(), getNetIOProt(), hasTCP(), Init(), and MsgIO().
Definition at line 55 of file C4Network2IO.h.
Referenced by Clear(), DataIO(), GenerateStatistics(), getNetIO(), getNetIOName(), getNetIOProt(), HandlePuncherPacket(), hasUDP(), Init(), InitPuncher(), MsgIO(), OnConn(), OnDisconn(), OnPacket(), Punch(), and SendPuncherPacket().
|
protected |
Definition at line 58 of file C4Network2IO.h.
Referenced by Clear(), Init(), and SetAcceptMode().
|
protected |
Definition at line 61 of file C4Network2IO.h.
Referenced by Clear(), Init(), IsReferenceNeeded(), and SetReference().
|
protected |
Definition at line 102 of file C4Network2IO.h.
Referenced by InitPuncher(), IsPuncherAddr(), OnDisconn(), and SendPuncherPacket().
|
protected |
Definition at line 102 of file C4Network2IO.h.
Referenced by InitPuncher(), IsPuncherAddr(), OnDisconn(), and SendPuncherPacket().
|
protected |
Definition at line 93 of file C4Network2IO.h.
Referenced by Execute(), GetNextTick(), and Init().
|
protected |
Definition at line 94 of file C4Network2IO.h.
|
protected |
Definition at line 97 of file C4Network2IO.h.
|
protected |
Definition at line 64 of file C4Network2IO.h.