clientext.cpp File Reference

Implementation of Client class extensions. More...

#include <hn/hnprec.h>
#include "clientext.h"
#include <hn/partdata.h>
#include <hn/sharedfile.h>
#include <hn/metadb.h>
#include <hn/metadata.h>
#include "clients.h"
#include "zutils.h"

Go to the source code of this file.


Namespaces

namespace  Detail

Object counters

size_t s_queueInfoCnt = 0
size_t s_uploadInfoCnt = 0
size_t s_downloadInfoCnt = 0
size_t s_sourceInfoCnt = 0

Variables

const std::string TRACE_CLIENT = "Ed2kClient"
const uint32_t SEND_TO_ONE_CLIENT = ED2K_PARTSIZE
 How much data to send to a single client during an upload session.

Detailed Description

Implementation of Client class extensions.

Definition in file clientext.cpp.


Variable Documentation

const std::string Detail::TRACE_CLIENT = "Ed2kClient"
 

Definition at line 31 of file clientext.cpp.

Referenced by Detail::UploadInfo::addReqChunk(), Detail::UploadInfo::bufferData(), Detail::UploadInfo::compress(), ClientList::exit(), ClientList::onClientEvent(), Detail::SourceInfo::remOffered(), Detail::DownloadInfo::write(), Detail::DownloadInfo::writePacked(), Detail::DownloadInfo::~DownloadInfo(), and Detail::UploadInfo::~UploadInfo().

const uint32_t Detail::SEND_TO_ONE_CLIENT = ED2K_PARTSIZE
 

How much data to send to a single client during an upload session.

Current ED2K clients seem to use ED2K_PARTSIZE here, which means 9.28mb, so that's what we should use.

If you want faster Queue rotation, lowering this value would give the desired result. It is recommended to keep this value at least in n*ED2K_CHUNKSIZE, to promote full chunks sending.

Definition at line 42 of file clientext.cpp.

Referenced by Detail::UploadInfo::addReqChunk().

size_t Detail::s_queueInfoCnt = 0
 

Definition at line 46 of file clientext.cpp.

Referenced by Detail::QueueInfo::count(), Detail::QueueInfo::QueueInfo(), and Detail::QueueInfo::~QueueInfo().

size_t Detail::s_uploadInfoCnt = 0
 

Definition at line 47 of file clientext.cpp.

Referenced by Detail::UploadInfo::count(), Detail::UploadInfo::UploadInfo(), and Detail::UploadInfo::~UploadInfo().

size_t Detail::s_downloadInfoCnt = 0
 

Definition at line 48 of file clientext.cpp.

Referenced by Detail::DownloadInfo::count(), Detail::DownloadInfo::DownloadInfo(), and Detail::DownloadInfo::~DownloadInfo().

size_t Detail::s_sourceInfoCnt = 0
 

Definition at line 49 of file clientext.cpp.

Referenced by Detail::SourceInfo::count(), Detail::SourceInfo::SourceInfo(), and Detail::SourceInfo::~SourceInfo().