#include <Datagrams.h>
Public Member Functions | |
CDatagrams () | |
virtual | ~CDatagrams () |
BOOL | Listen () |
void | Disconnect () |
BOOL | IsStable () |
BOOL | Send (IN_ADDR *pAddress, WORD nPort, CPacket *pPacket, BOOL bRelease=TRUE, LPVOID pToken=NULL, BOOL bAck=TRUE) |
BOOL | Send (SOCKADDR_IN *pHost, CPacket *pPacket, BOOL bRelease=TRUE, LPVOID pToken=NULL, BOOL bAck=TRUE) |
void | PurgeToken (LPVOID pToken) |
void | OnRun () |
Public Attributes | |
UDPBandwidthMeter | m_mInput |
DWORD | m_nInBandwidth |
DWORD | m_nInFrags |
DWORD | m_nInPackets |
UDPBandwidthMeter | m_mOutput |
DWORD | m_nOutBandwidth |
DWORD | m_nOutFrags |
DWORD | m_nOutPackets |
Protected Member Functions | |
void | Measure () |
BOOL | TryWrite () |
void | ManageOutput () |
void | Remove (CDatagramOut *pDG) |
BOOL | TryRead () |
BOOL | OnDatagram (SOCKADDR_IN *pHost, BYTE *pBuffer, DWORD nLength) |
BOOL | OnReceiveSGP (SOCKADDR_IN *pHost, SGP_HEADER *pHeader, DWORD nLength) |
BOOL | OnAcknowledgeSGP (SOCKADDR_IN *pHost, SGP_HEADER *pHeader, DWORD nLength) |
void | ManagePartials () |
void | Rerequest (CDatagramIn *pDG) |
void | Remove (CDatagramIn *pDG, BOOL bReclaimOnly=FALSE) |
BOOL | OnPacket (SOCKADDR_IN *pHost, CG2Packet *pPacket) |
BOOL | OnPing (SOCKADDR_IN *pHost, CG2Packet *pPacket) |
BOOL | OnPong (SOCKADDR_IN *pHost, CG2Packet *pPacket) |
BOOL | OnQuery (SOCKADDR_IN *pHost, CG2Packet *pPacket) |
BOOL | OnQueryAck (SOCKADDR_IN *pHost, CG2Packet *pPacket) |
BOOL | OnHit (SOCKADDR_IN *pHost, CG2Packet *pPacket) |
BOOL | OnQueryKeyRequest (SOCKADDR_IN *pHost, CG2Packet *pPacket) |
BOOL | OnQueryKeyAnswer (SOCKADDR_IN *pHost, CG2Packet *pPacket) |
BOOL | OnPush (SOCKADDR_IN *pHost, CG2Packet *pPacket) |
BOOL | OnCrawlRequest (SOCKADDR_IN *pHost, CG2Packet *pPacket) |
BOOL | OnCrawlAnswer (SOCKADDR_IN *pHost, CG2Packet *pPacket) |
Protected Attributes | |
SOCKET | m_hSocket |
WORD | m_nSequence |
BOOL | m_bStable |
DWORD | m_tLastWrite |
CBuffer * | m_pBufferBuffer |
DWORD | m_nBufferBuffer |
CBuffer * | m_pBufferFree |
DWORD | m_nBufferFree |
CDatagramIn * | m_pInputBuffer |
DWORD | m_nInputBuffer |
CDatagramIn * | m_pInputFree |
CDatagramIn * | m_pInputFirst |
CDatagramIn * | m_pInputLast |
CDatagramIn * | m_pInputHash [32] |
CDatagramOut * | m_pOutputBuffer |
DWORD | m_nOutputBuffer |
CDatagramOut * | m_pOutputFree |
CDatagramOut * | m_pOutputFirst |
CDatagramOut * | m_pOutputLast |
CDatagramOut * | m_pOutputHash [32] |
|
Definition at line 73 of file Datagrams.cpp. References m_bStable, m_hSocket, m_mInput, m_mOutput, m_nInBandwidth, m_nInFrags, m_nInPackets, m_nOutBandwidth, m_nOutFrags, m_nOutPackets, and m_nSequence. |
|
Definition at line 86 of file Datagrams.cpp. References Disconnect(). |
|
Definition at line 177 of file Datagrams.cpp. References m_hSocket, m_nBufferBuffer, m_nInBandwidth, m_nInFrags, m_nInPackets, m_nInputBuffer, m_nOutBandwidth, m_nOutFrags, m_nOutPackets, m_nOutputBuffer, m_pBufferBuffer, m_pInputBuffer, m_pInputFirst, m_pInputFree, m_pInputLast, m_pOutputBuffer, m_pOutputFirst, m_pOutputFree, m_pOutputLast, and NULL. Referenced by CNetwork::Disconnect(), and ~CDatagrams(). |
|
|
|
Definition at line 508 of file Datagrams.cpp. References CSettings::Gnutella2, m_pOutputLast, Remove(), Settings, and CSettings::sGnutella2::UdpOutExpire. Referenced by OnRun(). |
|
Definition at line 813 of file Datagrams.cpp. References CSettings::Gnutella2, m_pInputLast, Remove(), Settings, and CSettings::sGnutella2::UdpInExpire. Referenced by OnRun(). |
|
Definition at line 385 of file Datagrams.cpp. References m_mInput, m_mOutput, m_nInBandwidth, m_nOutBandwidth, METER_LENGTH, METER_PERIOD, UDPBandwidthMeter::nMeasure, UDPBandwidthMeter::pHistory, and UDPBandwidthMeter::pTimes. Referenced by OnRun(). |
|
Definition at line 780 of file Datagrams.cpp. References HASH_MASK, CDatagramOut::m_pNextHash, m_pOutputHash, CShareazaApp::Message(), MSG_DEBUG, SGP_HEADER::nPart, SGP_HEADER::nSequence, Remove(), and theApp. Referenced by OnDatagram(). |
|
Definition at line 1440 of file Datagrams.cpp. References CrawlSession, and CCrawlSession::OnCrawl(). Referenced by OnPacket(). |
|
|
Definition at line 604 of file Datagrams.cpp. References ED2K_PROTOCOL_EDONKEY, ED2K_PROTOCOL_EMULE, ED2K_PROTOCOL_PACKED, EDClients, CEDPacket::InflateOrRelease(), CEDPacket::New(), NULL, OnAcknowledgeSGP(), OnReceiveSGP(), CEDClients::OnUDP(), CPacket::Release(), SGP_TAG_2, and CPacket::SmartDump(). Referenced by TryRead(). |
|
|
Definition at line 869 of file Datagrams.cpp. References G2_PACKET_CRAWL_ANS, G2_PACKET_CRAWL_REQ, G2_PACKET_HIT, G2_PACKET_HIT_WRAP, G2_PACKET_PING, G2_PACKET_PONG, G2_PACKET_PUSH, G2_PACKET_QUERY, G2_PACKET_QUERY_ACK, G2_PACKET_QUERY_KEY_ANS, G2_PACKET_QUERY_KEY_REQ, m_nInPackets, Network, NULL, OnCrawlAnswer(), OnCrawlRequest(), OnHit(), OnPing(), OnPong(), OnPush(), OnQuery(), OnQueryAck(), OnQueryKeyAnswer(), OnQueryKeyRequest(), CNetwork::RoutePacket(), and CPacket::SmartDump(). Referenced by OnReceiveSGP(). |
|
Definition at line 928 of file Datagrams.cpp. References G2_PACKET_PONG, CG2Packet::New(), and Send(). Referenced by OnPacket(). |
|
Definition at line 937 of file Datagrams.cpp. References CNetwork::IsConnectedTo(), CG2Packet::m_bCompound, m_bStable, CPacket::m_nPosition, Network, and CG2Packet::ReadPacket(). Referenced by OnPacket(). |
|
Definition at line 1241 of file Datagrams.cpp. References CStatistics::Current, CG2Packet::Debug(), CPacket::GetRemaining(), Handshakes, CSecurity::IsDenied(), CNetwork::IsFirewalledAddress(), Network, CHandshakes::PushTo(), CPacket::ReadLongLE(), CPacket::ReadShortBE(), Security, CG2Packet::SkipCompound(), and Statistics. Referenced by OnPacket(). |
|
|
Definition at line 1044 of file Datagrams.cpp. References CHostCacheList::Add(), CHostCache::Gnutella2, HostCache, CRouteCache::Lookup(), CHostCacheHost::m_nFailures, CNeighbour::m_nNodeType, CHostCacheHost::m_tAck, Network, ntLeaf, NULL, CSearchManager::OnQueryAck(), CNetwork::QueryRoute, SearchManager, and CNeighbour::Send(). Referenced by OnPacket(). |
|
Definition at line 1171 of file Datagrams.cpp. References CHostCacheList::Add(), CNeighboursBase::Get(), CHostCache::Gnutella2, HostCache, CPacket::m_bBigEndian, CG2Packet::m_bCompound, CPacket::m_nPosition, CNetwork::m_pHost, CShareazaApp::Message(), MSG_DEBUG, Neighbours, Network, NULL, CPacket::ReadLongBE(), CPacket::ReadLongLE(), CG2Packet::ReadPacket(), CHostCacheHost::SetKey(), theApp, and CPacket::WriteGetPointer(). Referenced by OnPacket(). |
|
|
|
Definition at line 366 of file Datagrams.cpp. References m_hSocket, ManageOutput(), ManagePartials(), Measure(), TryRead(), and TryWrite(). Referenced by CNetwork::OnRun(). |
|
Definition at line 340 of file Datagrams.cpp. References m_pOutputLast, CNetwork::m_pSection, CShareazaApp::Message(), MSG_DEBUG, Network, Remove(), and theApp. Referenced by CManagedSearch::Stop(). |
|
Definition at line 833 of file Datagrams.cpp. References CBuffer::Clear(), m_nBufferFree, CDatagramIn::m_pBuffer, m_pBufferFree, m_pInputFirst, m_pInputFree, m_pInputLast, CBuffer::m_pNext, CDatagramIn::m_pNextHash, CDatagramIn::m_pNextTime, CDatagramIn::m_pPrevHash, CDatagramIn::m_pPrevTime, and NULL. |
|
Definition at line 528 of file Datagrams.cpp. References CBuffer::Clear(), m_nBufferFree, CDatagramOut::m_pBuffer, m_pBufferFree, CBuffer::m_pNext, CDatagramOut::m_pNextHash, CDatagramOut::m_pNextTime, m_pOutputFirst, m_pOutputFree, m_pOutputLast, CDatagramOut::m_pPrevHash, CDatagramOut::m_pPrevTime, and NULL. Referenced by ManageOutput(), ManagePartials(), OnAcknowledgeSGP(), OnReceiveSGP(), PurgeToken(), and Send(). |
|
|
|
|
|
Definition at line 561 of file Datagrams.cpp. References CStatistics::Current, CSecurity::IsAccepted(), m_hSocket, m_mInput, METER_LENGTH, METER_MINIMUM, UDPBandwidthMeter::nPosition, UDPBandwidthMeter::nTotal, OnDatagram(), UDPBandwidthMeter::pHistory, UDPBandwidthMeter::pTimes, Security, Statistics, TEMP_BUFFER, and UDPBandwidthMeter::tLastSlot. Referenced by OnRun(). |
|
|
Definition at line 75 of file Datagrams.h. Referenced by CDatagrams(), IsStable(), and OnPong(). |
|
Definition at line 73 of file Datagrams.h. Referenced by CDatagrams(), Disconnect(), IsStable(), Listen(), OnReceiveSGP(), OnRun(), Send(), TryRead(), and TryWrite(). |
|
Definition at line 97 of file Datagrams.h. Referenced by CDatagrams(), Measure(), and TryRead(). |
|
Definition at line 101 of file Datagrams.h. Referenced by CDatagrams(), Measure(), and TryWrite(). |
|
Definition at line 79 of file Datagrams.h. Referenced by Disconnect(), and Listen(). |
|
Definition at line 81 of file Datagrams.h. Referenced by Listen(), OnReceiveSGP(), Remove(), and Send(). |
|
Definition at line 98 of file Datagrams.h. Referenced by CDatagrams(), Disconnect(), CGraphItem::GetValue(), and Measure(). |
|
Definition at line 99 of file Datagrams.h. Referenced by CDatagrams(), Disconnect(), Listen(), OnReceiveSGP(), Send(), and TryWrite(). |
|
Definition at line 100 of file Datagrams.h. Referenced by CDatagrams(), Disconnect(), Listen(), and OnPacket(). |
|
Definition at line 84 of file Datagrams.h. Referenced by Disconnect(), and Listen(). |
|
Definition at line 102 of file Datagrams.h. Referenced by CDatagrams(), Disconnect(), CGraphItem::GetValue(), and Measure(). |
|
Definition at line 103 of file Datagrams.h. Referenced by CDatagrams(), Disconnect(), Listen(), and TryWrite(). |
|
Definition at line 104 of file Datagrams.h. Referenced by CDatagrams(), Disconnect(), Listen(), and Send(). |
|
Definition at line 91 of file Datagrams.h. Referenced by Disconnect(), and Listen(). |
|
Definition at line 74 of file Datagrams.h. Referenced by CDatagrams(), and Send(). |
|
Definition at line 78 of file Datagrams.h. Referenced by Disconnect(), and Listen(). |
|
Definition at line 80 of file Datagrams.h. Referenced by Listen(), OnReceiveSGP(), Remove(), and Send(). |
|
Definition at line 83 of file Datagrams.h. Referenced by Disconnect(), and Listen(). |
|
Definition at line 86 of file Datagrams.h. Referenced by Disconnect(), Listen(), OnReceiveSGP(), and Remove(). |
|
Definition at line 85 of file Datagrams.h. Referenced by Disconnect(), Listen(), OnReceiveSGP(), and Remove(). |
|
Definition at line 88 of file Datagrams.h. Referenced by Listen(), and OnReceiveSGP(). |
|
Definition at line 87 of file Datagrams.h. Referenced by Disconnect(), Listen(), ManagePartials(), OnReceiveSGP(), and Remove(). |
|
Definition at line 90 of file Datagrams.h. Referenced by Disconnect(), and Listen(). |
|
Definition at line 93 of file Datagrams.h. Referenced by Disconnect(), Listen(), Remove(), Send(), and TryWrite(). |
|
Definition at line 92 of file Datagrams.h. Referenced by Disconnect(), Listen(), Remove(), and Send(). |
|
Definition at line 95 of file Datagrams.h. Referenced by Listen(), OnAcknowledgeSGP(), and Send(). |
|
Definition at line 94 of file Datagrams.h. Referenced by Disconnect(), Listen(), ManageOutput(), PurgeToken(), Remove(), and Send(). |
|
Definition at line 76 of file Datagrams.h. Referenced by Listen(), and TryWrite(). |