public void ProcessEmuleHello(byte[] packet,bool isResponse) { #if VERBOSE CKernel.LogClient.AddLog("ProcessEmuleHello",m_ID); #endif MemoryStream buffer=new MemoryStream(packet); CMuleHello MuleHello=new CMuleHello(buffer); m_UDPPort=MuleHello.PortUDP; m_SourceExchangeVersion=MuleHello.VersionSourceExchange; //m_VersionMinor=(uint)MuleHello.VersioneMule; m_VersionMinor=Convert.ToUInt32(MuleHello.VersioneMule.ToString("X")); m_VersionMajor=0; m_VersionRevision=0; m_EmuleProtocol=true; m_Software=MuleHello.IDClientCompatible; if (m_Software==(byte)Protocol.Client.Hathi) { m_VersionMinor=MuleHello.VersionLphant; } m_VersionUDP=MuleHello.VersionUDP; m_VersionComments=MuleHello.VersionComments; m_VersionCompression=MuleHello.VersionCompression; m_VersionExtendedRequest=MuleHello.VersionExtendedRequests; if (!isResponse) SendEmuleHello(true); }
public void SendEmuleHello(bool isResponse) { #if VERBOSE CKernel.LogClient.AddLog("SendEmuleHello response:"+Convert.ToString(isResponse),m_ID); #endif MemoryStream responsePacket=new MemoryStream(); CMuleHello HolaeMule=new CMuleHello(responsePacket,isResponse); if (connection!=null) { connection.SendPacket(responsePacket); } }