serverlist.cpp File Reference

Implementation of ServerList and Server classes. More...

#include <hn/hnprec.h>
#include <hn/utils.h>
#include <hn/log.h>
#include <hn/ssocket.h>
#include <hn/fileslist.h>
#include <hn/sharedfile.h>
#include <hn/partdata.h>
#include <hn/metadb.h>
#include "serverlist.h"
#include "server.h"
#include "ed2k.h"
#include "clientlist.h"
#include "parser.h"
#include "downloadlist.h"
#include <boost/lambda/bind.hpp>
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/key_extractors.hpp>
#include <boost/multi_index/ordered_index.hpp>

Go to the source code of this file.


Namespaces

namespace  Detail

Typedefs

typedef MIServerList::nth_index<
0 >::type::iterator 
ServIter
typedef MIServerList::nth_index<
1 >::type::iterator 
AddrIter
typedef MIServerList::nth_index<
2 >::type::iterator 
NameIter

Enumerations

enum  ED2K_ServerCommConstants { SOURCEREASKTIME = 20*60*1000, SERVERPINGTIME = 20*60*1000, SERVERTIMEOUT = 30000 }
 Constants used internally by ServerList. More...

Functions

 IMPLEMENT_EVENT_TABLE (ServerList, ServerList *, ServerList::ServerListEvent)
 DECLARE_PACKET_HANDLER (ServerList, ServerMessage)
 DECLARE_PACKET_HANDLER (ServerList, IdChange)
 DECLARE_PACKET_HANDLER (ServerList, ServerStatus)
 DECLARE_PACKET_HANDLER (ServerList, ServerList)
 DECLARE_PACKET_HANDLER (ServerList, ServerIdent)
 DECLARE_PACKET_HANDLER (ServerList, SearchResult)
 DECLARE_PACKET_HANDLER (ServerList, CallbackReq)
 DECLARE_PACKET_HANDLER (ServerList, FoundSources)
 catch (Utils::ReadError &)
 catch (std::exception &e)

Variables

const std::string TRACE = "Ed2k::ServerList"

Detailed Description

Implementation of ServerList and Server classes.

Definition in file serverlist.cpp.


Typedef Documentation

typedef MIServerList::nth_index<0>::type::iterator Detail::ServIter
 

Definition at line 89 of file serverlist.cpp.

typedef MIServerList::nth_index<1>::type::iterator Detail::AddrIter
 

Definition at line 90 of file serverlist.cpp.

typedef MIServerList::nth_index<2>::type::iterator Detail::NameIter
 

Definition at line 91 of file serverlist.cpp.


Enumeration Type Documentation

enum ED2K_ServerCommConstants
 

Constants used internally by ServerList.

Enumeration values:
SOURCEREASKTIME  UDP queries time, 20 minutes.
SERVERPINGTIME  Server ping time, 20 minutes.
SERVERTIMEOUT  Server connection timeout.

Definition at line 43 of file serverlist.cpp.


Function Documentation

IMPLEMENT_EVENT_TABLE ServerList  ,
ServerList ,
ServerList::ServerListEvent 
 

DECLARE_PACKET_HANDLER ServerList  ,
ServerMessage 
 

DECLARE_PACKET_HANDLER ServerList  ,
IdChange 
 

DECLARE_PACKET_HANDLER ServerList  ,
ServerStatus 
 

DECLARE_PACKET_HANDLER ServerList  ,
ServerList 
 

DECLARE_PACKET_HANDLER ServerList  ,
ServerIdent 
 

DECLARE_PACKET_HANDLER ServerList  ,
SearchResult 
 

DECLARE_PACKET_HANDLER ServerList  ,
CallbackReq 
 

DECLARE_PACKET_HANDLER ServerList  ,
FoundSources 
 

catch Utils::ReadError &   ) 
 

Definition at line 776 of file serverlist.cpp.

catch std::exception &  e  ) 
 

Definition at line 778 of file serverlist.cpp.


Variable Documentation

const std::string TRACE = "Ed2k::ServerList"
 

Definition at line 49 of file serverlist.cpp.

Referenced by ServerList::connect(), ServerList::handleGlobSources(), ServerList::handleGlobStatRes(), ServerList::load(), ServerList::onPacket(), ServerList::onServerEvent(), ServerList::onServerListEvent(), ServerList::onServerSocketEvent(), ServerList::performSearch(), ServerList::pingServer(), ServerList::publishFile(), ServerList::queryNextServer(), ServerList::reqSources(), and ServerList::udpGetSources().