libktorrent  2.2.0
Public Member Functions | Static Public Member Functions | List of all members
bt::UTPex Class Reference

#include <utpex.h>

Inheritance diagram for bt::UTPex:
Inheritance graph
[legend]

Public Member Functions

 UTPex (Peer *peer, Uint32 id)
 
void changeID (Uint32 nid)
 Change the ID used in the extended packets.
 
void handlePacket (const Uint8 *packet, Uint32 size) override
 
bool needsUpdate () const override
 Do we need to update PEX (should happen every minute)
 
void update () override
 Send a new PEX packet to the Peer.
 
- Public Member Functions inherited from bt::PeerProtocolExtension
 PeerProtocolExtension (bt::Uint32 id, Peer *peer)
 
void changeID (Uint32 id)
 Change the ID.
 
void sendPacket (const QByteArray &data)
 Send an extension protocol packet.
 

Static Public Member Functions

static bool isEnabled ()
 Is PEX enabled globally.
 
static void setEnabled (bool on)
 Globally disable or enabled PEX.
 

Additional Inherited Members

- Protected Attributes inherited from bt::PeerProtocolExtension
bt::Uint32 id
 
Peerpeer
 

Detailed Description

Author
Joris Guisson joris.nosp@m..gui.nosp@m.sson@.nosp@m.gmai.nosp@m.l.com

Class which handles µTorrent's peer exchange

Definition at line 40 of file utpex.h.

Member Function Documentation

◆ handlePacket()

void bt::UTPex::handlePacket ( const Uint8 *  packet,
Uint32  size 
)
overridevirtual

Handle a PEX packet

Parameters
packetThe packet
sizeThe size of the packet

Implements bt::PeerProtocolExtension.


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