• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

dht Namespace Reference


Classes

class  AnnounceReq
class  AnnounceRsp
class  AnnounceTask
 
Author:
Joris Guisson <joris.guisson@gmail.com>
More...
struct  BucketHeader
class  Database
 
Author:
Joris Guisson
More...
class  DBItem
 
Author:
Joris Guisson
More...
class  DHT
 
Author:
Joris Guisson <joris.guisson@gmail.com>
More...
class  DHTBase
 
Author:
Joris Guisson <joris.guisson@gmail.com>
More...
class  DHTTrackerBackend
 
Author:
Joris Guisson <joris.guisson@gmail.com>
More...
class  ErrMsg
class  FindNodeReq
class  FindNodeRsp
class  GetPeersReq
class  GetPeersRsp
class  KBucket
 
Author:
Joris Guisson
More...
class  KBucketEntry
 
Author:
Joris Guisson
More...
class  KBucketEntryAndToken
class  KClosestNodesSearch
 
Author:
Joris Guisson <joris.guisson@gmail.com>
More...
class  Key
 
Author:
Joris Guisson
More...
class  MsgBase
 Base class for all RPC messages. More...
class  Node
 
Author:
Joris Guisson
More...
class  NodeLookup
 
Author:
Joris Guisson <joris.guisson@gmail.com>
More...
class  PackedNodeContainer
class  PingReq
class  PingRsp
class  RPCCall
 
Author:
Joris Guisson
More...
class  RPCCallListener
 Class which objects should derive from, if they want to know the result of a call. More...
class  RPCServer
 
Author:
Joris Guisson
More...
struct  Stats
class  Task
 
Author:
Joris Guisson <joris.guisson@gmail.com>
More...
class  TaskManager
 
Author:
Joris Guisson <joris.guisson@gmail.com>
More...

Typedefs

typedef QList< DBItem > DBItemList
typedef std::map< dht::Key,
KBucketEntry >::iterator 
KNSitr
typedef bt::PtrMap< Uint32,
Task >::iterator 
TaskItr

Enumerations

enum  Method {
  PING, FIND_NODE, GET_PEERS, ANNOUNCE_PEER,
  NONE
}
enum  Type { REQ_MSG, RSP_MSG, ERR_MSG, INVALID }

Functions

static dht::Key LoadKey (const QString &key_file, bool &new_key)
MsgBase * MakeMsg (bt::BDictNode *dict)
MsgBase * MakeRPCMsg (bt::BDictNode *dict, RPCServer *srv)
MsgBase * MakeRPCMsgTest (bt::BDictNode *dict, dht::Method req_method)
void PackBucketEntry (const KBucketEntry &e, QByteArray &ba, Uint32 off)
MsgBase * ParseErr (bt::BDictNode *dict)
MsgBase * ParseReq (bt::BDictNode *dict)
MsgBase * ParseRsp (bt::BDictNode *dict, RPCServer *srv)
MsgBase * ParseRsp (bt::BDictNode *dict, dht::Method req_method, Uint8 mtid)
static void PrintRawData (const QByteArray &data)
Key RandomKeyInBucket (Uint32 b, const Key &our_id)
static void SaveKey (const dht::Key &key, const QString &key_file)
KBucketEntry UnpackBucketEntry (const QByteArray &ba, Uint32 off, int ip_version)

Variables

const QString ARG = "a"
const Uint32 BUCKET_MAGIC_NUMBER = 0xB0C4B0C4
const Uint32 BUCKET_REFRESH_INTERVAL = 15 * 60 * 1000
const QString ERR_DHT = "e"
const Uint32 K = 8
const Uint32 MAX_CONCURRENT_REQS = 16
const bt::Uint32 MAX_ITEM_AGE = 30 * 60 * 1000
const QString REQ = "q"
const QString RSP = "r"
const QString TID = "t"
const QString TYP = "y"

Typedef Documentation

typedef QList<DBItem> dht::DBItemList

Definition at line 69 of file database.h.

typedef std::map<dht::Key,KBucketEntry>::iterator dht::KNSitr

Definition at line 29 of file kclosestnodessearch.cpp.

typedef bt::PtrMap<Uint32,Task>::iterator dht::TaskItr

Definition at line 30 of file taskmanager.cpp.


Enumeration Type Documentation

enum dht::Method

Enumerator:
PING 
FIND_NODE 
GET_PEERS 
ANNOUNCE_PEER 
NONE 

Definition at line 50 of file rpcmsg.h.

enum dht::Type

Enumerator:
REQ_MSG 
RSP_MSG 
ERR_MSG 
INVALID 

Definition at line 42 of file rpcmsg.h.


Function Documentation

static dht::Key dht::LoadKey ( const QString &  key_file,
bool &  new_key 
) [static]

Definition at line 53 of file node.cpp.

MsgBase* dht::MakeMsg ( bt::BDictNode *  dict  ) 

MsgBase * dht::MakeRPCMsg ( bt::BDictNode *  dict,
RPCServer *  srv 
)

Creates a message out of a BDictNode.

Parameters:
dict The BDictNode
srv The RPCServer
Returns:
A newly created message or 0 upon error

Definition at line 251 of file rpcmsg.cpp.

MsgBase * dht::MakeRPCMsgTest ( bt::BDictNode *  dict,
dht::Method  req_method 
)

Definition at line 273 of file rpcmsg.cpp.

void dht::PackBucketEntry ( const KBucketEntry &  e,
QByteArray &  ba,
Uint32  off 
)

Pack a KBucketEntry into a byte array.

If the array is not large enough, an error will be thrown

Parameters:
e The entry
ba The byte array
off The offset into the array

Definition at line 30 of file pack.cpp.

MsgBase* dht::ParseErr ( bt::BDictNode *  dict  ) 

Definition at line 232 of file rpcmsg.cpp.

MsgBase* dht::ParseReq ( bt::BDictNode *  dict  ) 

Definition at line 45 of file rpcmsg.cpp.

MsgBase* dht::ParseRsp ( bt::BDictNode *  dict,
RPCServer *  srv 
)

Definition at line 205 of file rpcmsg.cpp.

MsgBase* dht::ParseRsp ( bt::BDictNode *  dict,
dht::Method  req_method,
Uint8  mtid 
)

Definition at line 97 of file rpcmsg.cpp.

static void dht::PrintRawData ( const QByteArray &  data  )  [static]

Definition at line 85 of file rpcserver.cpp.

Key dht::RandomKeyInBucket ( Uint32  b,
const Key &  our_id 
)

Generate a random key which lies in a certain bucket.

Definition at line 183 of file node.cpp.

static void dht::SaveKey ( const dht::Key &  key,
const QString &  key_file 
) [static]

Definition at line 40 of file node.cpp.

KBucketEntry dht::UnpackBucketEntry ( const QByteArray &  ba,
Uint32  off,
int  ip_version 
)

Unpack a KBucketEntry from a byte array.

If a full entry cannot be read an error will be thrown.

Parameters:
ba The byte array
off The offset
ip_version The ip version (4 or 6)
Returns:
The entry

Definition at line 60 of file pack.cpp.


Variable Documentation

const QString dht::ARG = "a"

Definition at line 38 of file rpcmsg.cpp.

const Uint32 dht::BUCKET_MAGIC_NUMBER = 0xB0C4B0C4

Definition at line 48 of file kbucket.h.

const Uint32 dht::BUCKET_REFRESH_INTERVAL = 15 * 60 * 1000

Definition at line 49 of file kbucket.h.

const QString dht::ERR_DHT = "e"

Definition at line 39 of file rpcmsg.cpp.

const Uint32 dht::K = 8

Definition at line 47 of file kbucket.h.

const Uint32 dht::MAX_CONCURRENT_REQS = 16

Definition at line 38 of file task.h.

const bt::Uint32 dht::MAX_ITEM_AGE = 30 * 60 * 1000

Each item may only exist for 30 minutes.

Definition at line 35 of file database.h.

const QString dht::REQ = "q"

Definition at line 35 of file rpcmsg.cpp.

const QString dht::RSP = "r"

Definition at line 36 of file rpcmsg.cpp.

const QString dht::TID = "t"

Definition at line 34 of file rpcmsg.cpp.

const QString dht::TYP = "y"

Definition at line 37 of file rpcmsg.cpp.

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal