MCPcopy Create free account
hub / github.com/amule-project/amule / SafeSendPacket

Method SafeSendPacket

src/BaseClient.cpp:2032–2041  ·  view source on GitHub ↗

sends a packet, if needed it will establish a connection before options used: ignore max connections, control packet, delete packet !if the functions returns false it is _possible_ that this clientobject was deleted, because the connectiontry fails

Source from the content-addressed store, hash-verified

2030// options used: ignore max connections, control packet, delete packet
2031// !if the functions returns false it is _possible_ that this clientobject was deleted, because the connectiontry fails
2032bool CUpDownClient::SafeSendPacket(CPacket* packet)
2033{
2034 if (IsConnected()) {
2035 SendPacket(packet, true);
2036 return true;
2037 } else {
2038 m_WaitingPackets_list.push_back(packet);
2039 return TryToConnect(true);
2040 }
2041}
2042
2043void CUpDownClient::SendPublicKeyPacket()
2044{

Callers 1

ProcessMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected