#include <hn/hnprec.h>
#include "clients.h"
#include "ed2k.h"
#include "serverlist.h"
#include "creditsdb.h"
#include "parser.h"
#include "clientext.h"
#include <hn/metadb.h>
#include <hn/sharedfile.h>
#include <hn/partdata.h>
#include <hn/fileslist.h>
#include <hn/lambda_placeholders.h>
#include <hn/hydranode.h>
#include <hn/ssocket.h>
#include <hn/hashsetmaker.h>
#include <boost/lambda/bind.hpp>
Go to the source code of this file.
Namespaces | |
| namespace | Detail |
Signals emitted from Client object | |
| These are declared here, as global, because we cannot use static data in modules. | |
| boost::signal< void(Client *, uint32_t) | changeId ) |
| Emitted when a client changes it's ID. | |
| boost::signal< bool(const Hash< ED2KHash > &, IPV4Address, IPV4Address, bool) > | foundSource |
| Emitted when a new source is discovered by a client. | |
| boost::signal< void(IPV4Address)> | foundServer |
| Emitted when a new server is discovered. | |
Enumerations | |
| enum | Ed2k_ClientConstants { SOURCE_REASKTIME = 30*60*1000, UDP_TIMEOUT = 30000, SOCKET_TIMEOUT = 30000, CALLBACK_TIMEOUT = 60000, CONNECT_TIMEOUT = 15000 } |
| Here's a collection of things that can be used to tweak the ed2k inter-client communication procedures. More... | |
Functions | |
| IMPLEMENT_EVENT_TABLE (Client, Client *, ClientEvent) | |
| DECLARE_PACKET_HANDLER (Client, Hello) | |
| DECLARE_PACKET_HANDLER (Client, MuleInfo) | |
| DECLARE_PACKET_HANDLER (Client, ReqFile) | |
| DECLARE_PACKET_HANDLER (Client, SetReqFileId) | |
| DECLARE_PACKET_HANDLER (Client, ReqHashSet) | |
| DECLARE_PACKET_HANDLER (Client, StartUploadReq) | |
| DECLARE_PACKET_HANDLER (Client, ReqChunks) | |
| DECLARE_PACKET_HANDLER (Client, CancelTransfer) | |
| DECLARE_PACKET_HANDLER (Client, FileName) | |
| DECLARE_PACKET_HANDLER (Client, FileDesc) | |
| DECLARE_PACKET_HANDLER (Client, FileStatus) | |
| DECLARE_PACKET_HANDLER (Client, NoFile) | |
| DECLARE_PACKET_HANDLER (Client, HashSet) | |
| DECLARE_PACKET_HANDLER (Client, AcceptUploadReq) | |
| DECLARE_PACKET_HANDLER (Client, QueueRanking) | |
| DECLARE_PACKET_HANDLER (Client, MuleQueueRank) | |
| DECLARE_PACKET_HANDLER (Client, DataChunk) | |
| DECLARE_PACKET_HANDLER (Client, PackedChunk) | |
| DECLARE_PACKET_HANDLER (Client, SourceExchReq) | |
| DECLARE_PACKET_HANDLER (Client, AnswerSources) | |
| DECLARE_PACKET_HANDLER (Client, Message) | |
| DECLARE_PACKET_HANDLER (Client, ChangeId) | |
| DECLARE_PACKET_HANDLER (Client, SecIdentState) | |
| DECLARE_PACKET_HANDLER (Client, PublicKey) | |
| DECLARE_PACKET_HANDLER (Client, Signature) | |
Variables | |
| uint64_t | s_curTick = 0 |
| Static variable keeping current tick. | |
| const std::string | TRACE_CLIENT = "Ed2kClient" |
| Client trace mask. | |
| const std::string | TRACE_SECIDENT = "Ed2kClient::SecIdent" |
| const std::string | TRACE_DEADSRC = "ED2KClient::DeadSource" |
| const std::string | TRACE_SRCEXCH = "ED2KClient::SourceExchange" |
| ED2KUDPSocket * | s_clientUdpSocket = 0 |
| UDP Socket for performing Client <-> Client UDP communication. | |
Definition in file clients.cpp.
|
|
Here's a collection of things that can be used to tweak the ed2k inter-client communication procedures. Don't change these unless you know what you'r doing. Incorrect values here can seriously affect the modules' networking performance.
Definition at line 50 of file clients.cpp. |
|
||||||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
Static variable keeping current tick. This is updated before time-calcuation operations to reduce getTick() calls during calculations. Definition at line 42 of file clients.cpp. Referenced by Client::getScore(). |
|
|
Client trace mask.
Definition at line 91 of file clients.cpp. |
|
|
Definition at line 92 of file clients.cpp. |
|
|
Definition at line 93 of file clients.cpp. |
|
|
Definition at line 94 of file clients.cpp. |
|
|
UDP Socket for performing Client <-> Client UDP communication.
Definition at line 97 of file clients.cpp. Referenced by Client::getUdpSocket(), Client::onPacket(), and Client::reaskForDownload(). |
|
|
Emitted when a client changes it's ID.
Definition at line 101 of file clients.cpp. Referenced by Client::onPacket(), and Client::storeInfo(). |
|
|
Emitted when a new source is discovered by a client.
Definition at line 104 of file clients.cpp. Referenced by ServerList::handleGlobSources(), ServerList::onPacket(), and Client::onPacket(). |
|
|
Emitted when a new server is discovered.
Definition at line 105 of file clients.cpp. Referenced by Client::onPacket(). |