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

Method SendHelloPacket

src/BaseClient.cpp:721–744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

719
720
721bool CUpDownClient::SendHelloPacket()
722{
723 wxCHECK(m_socket != NULL, true);
724
725 // if IP is filtered, don't greet him but disconnect...
726 if (theApp->ipfilter->IsFiltered(m_socket->GetPeerInt())) {
727 if (Disconnected("IPFilter")) {
728 Safe_Delete();
729 return false;
730 }
731 return true;
732 }
733
734 CMemFile data(128);
735 data.WriteUInt8(16); // size of userhash
736 SendHelloTypePacket(&data);
737
738 CPacket* packet = new CPacket(data, OP_EDONKEYPROT, OP_HELLO);
739 theStats::AddUpOverheadOther(packet->GetPacketSize());
740 SendPacket(packet,true);
741 m_bHelloAnswerPending = true;
742 AddDebugLogLineN( logLocalClient, "Local Client: OP_HELLO to " + GetFullIP() );
743 return true;
744}
745
746void CUpDownClient::SendMuleInfoPacket(bool bAnswer, bool OSInfo)
747{

Callers 1

OnConnectMethod · 0.80

Calls 4

WriteUInt8Method · 0.80
GetPacketSizeMethod · 0.80
IsFilteredMethod · 0.45
GetPeerIntMethod · 0.45

Tested by

no test coverage detected