libktorrent  2.2.0
Public Types | Public Member Functions | List of all members
dht::PingRsp Class Reference

#include <pingrsp.h>

Inheritance diagram for dht::PingRsp:
Inheritance graph
[legend]

Public Types

typedef QSharedPointer< PingRspPtr
 
- Public Types inherited from dht::RPCMsg
typedef QSharedPointer< RPCMsgPtr
 

Public Member Functions

 PingRsp (const QByteArray &mtid, const Key &id)
 
void apply (DHT *dh_table) override
 
void encode (QByteArray &arr) const override
 
void print () override
 
- Public Member Functions inherited from dht::RPCMsg
 RPCMsg (const QByteArray &mtid, Method m, Type type, const Key &id)
 
const net::AddressgetDestination () const
 Get the origin.
 
const KeygetID () const
 Get the id of the sender.
 
Method getMethod () const
 Get the message it's method.
 
const QByteArray & getMTID () const
 Get the MTID.
 
const net::AddressgetOrigin () const
 Get the origin.
 
Type getType () const
 Get the type of the message.
 
virtual void parse (bt::BDictNode *dict)
 
void setDestination (const net::Address &o)
 Set the origin (i.e. where the message came from)
 
void setMTID (const QByteArray &m)
 Set the MTID.
 
void setOrigin (const net::Address &o)
 Set the origin (i.e. where the message came from)
 

Additional Inherited Members

- Protected Attributes inherited from dht::RPCMsg
Key id
 
Method method
 
QByteArray mtid
 
net::Address origin
 
Type type
 

Detailed Description

Ping response message in the DHT protocol

Definition at line 51 of file pingrsp.h.

Member Function Documentation

◆ apply()

void dht::PingRsp::apply ( DHT dh_table)
overridevirtual

When this message arrives this function will be called upon the DHT. The message should then call the appropriate DHT function (double dispatch)

Parameters
dh_tablePointer to DHT

Implements dht::RPCMsg.

◆ encode()

void dht::PingRsp::encode ( QByteArray &  arr) const
overridevirtual

BEncode the message.

Parameters
arrData array

Implements dht::RPCMsg.

◆ print()

void dht::PingRsp::print ( )
overridevirtual

Print the message for debugging purposes.

Implements dht::RPCMsg.


The documentation for this class was generated from the following file: