Google
Web alhem.net

MyHandler Class Reference

#include <MyHandler.h>

Collaboration diagram for MyHandler:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< PEER * > peer_v
typedef std::map< std::string,
peer_v
peer_m

Public Member Functions

 MyHandler (const std::string &)
 ~MyHandler ()
std::string GetVersion ()
unsigned char * GetKey_m2minion ()
int GetInt (const std::string &)
std::string GetString (const std::string &)
bool GetBoolean (const std::string &)
std::string escape (const std::string &)
PEERreg_peer (const std::string &hash, const std::string &peer_id, const std::string &ip, port_t port)
void CreatePeers (TcpSocket *, const std::string &hash, size_t)
void SendList ()
void CheckDropped ()
void SendInit (MyMinionSocket *)
size_t MapSize ()
void HtmlReport (TrackerSock *)

Private Attributes

Configuration m_config
peer_m m_peers

Classes

struct  PEER

Detailed Description

File ......... MyHandler.h Published .... 2004-04-20

Definition at line 38 of file MyHandler.h.


Member Typedef Documentation

typedef std::vector<PEER *> MyHandler::peer_v

Definition at line 83 of file MyHandler.h.

typedef std::map<std::string,peer_v> MyHandler::peer_m

Definition at line 84 of file MyHandler.h.


Constructor & Destructor Documentation

MyHandler::MyHandler ( const std::string &  f  ) 

File ......... MyHandler.cpp Published .... 2004-04-20

Definition at line 30 of file MyHandler.cpp.

MyHandler::~MyHandler (  ) 

Definition at line 37 of file MyHandler.cpp.

References m_peers.


Member Function Documentation

std::string MyHandler::GetVersion (  )  [inline]

Definition at line 89 of file MyHandler.h.

References GetString().

unsigned char* MyHandler::GetKey_m2minion (  )  [inline]

Definition at line 93 of file MyHandler.h.

References k1.

Referenced by SendInit().

int MyHandler::GetInt ( const std::string &   ) 

Definition at line 52 of file MyHandler.cpp.

References Configuration::Find(), BaseXMLFile::GetProperty(), BaseXMLFile::GetRootElement(), m_config, and BaseXMLFile::SetCurrent().

Referenced by CheckDropped(), connect(), CreatePeers(), and reg_minder().

std::string MyHandler::GetString ( const std::string &   ) 

Definition at line 69 of file MyHandler.cpp.

References Configuration::Find(), BaseXMLFile::GetProperty(), BaseXMLFile::GetRootElement(), m_config, and BaseXMLFile::SetCurrent().

Referenced by GetVersion(), and reg_minder().

bool MyHandler::GetBoolean ( const std::string &   ) 

Definition at line 83 of file MyHandler.cpp.

References Configuration::Find(), BaseXMLFile::GetProperty(), BaseXMLFile::GetRootElement(), m_config, and BaseXMLFile::SetCurrent().

std::string MyHandler::escape ( const std::string &   ) 

Definition at line 104 of file MyHandler.cpp.

Referenced by reg_peer().

MyHandler::PEER * MyHandler::reg_peer ( const std::string &  hash,
const std::string &  peer_id,
const std::string &  ip,
port_t  port 
)

Definition at line 133 of file MyHandler.cpp.

References escape(), and m_peers.

void MyHandler::CreatePeers ( TcpSocket *  ,
const std::string &  hash,
size_t   
)

Definition at line 158 of file MyHandler.cpp.

References GetInt(), and m_peers.

void MyHandler::SendList (  ) 

Definition at line 195 of file MyHandler.cpp.

References m_peers.

void MyHandler::CheckDropped (  ) 

Definition at line 245 of file MyHandler.cpp.

References GetInt(), and m_peers.

void MyHandler::SendInit ( MyMinionSocket  ) 

Definition at line 264 of file MyHandler.cpp.

References GetKey_m2minion(), and m_peers.

size_t MyHandler::MapSize (  ) 

Definition at line 295 of file MyHandler.cpp.

References m_peers.

void MyHandler::HtmlReport ( TrackerSock  ) 


Member Data Documentation

Configuration MyHandler::m_config [private]

Definition at line 114 of file MyHandler.h.

Referenced by GetBoolean(), GetInt(), and GetString().

peer_m MyHandler::m_peers [private]

Definition at line 115 of file MyHandler.h.

Referenced by CheckDropped(), CreatePeers(), MapSize(), reg_peer(), SendInit(), SendList(), and ~MyHandler().


The documentation for this class was generated from the following files:
Generated on Thu Sep 27 12:58:30 2007 for distributed bittorrent tracker by  doxygen 1.5.2