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

#include <serverauthenticate.h>

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

Public Member Functions

 ServerAuthenticate (mse::EncryptedPacketSocket::Ptr sock)
 
- Public Member Functions inherited from bt::AuthenticateBase
 AuthenticateBase (mse::EncryptedPacketSocket::Ptr s)
 
mse::EncryptedPacketSocket::Ptr getSocket () const
 get the socket
 
bool isFinished () const
 See if the authentication is finished.
 
bool isLocal () const
 Is this a local peer.
 
virtual void onReadyRead ()
 We can read from the socket.
 
virtual void onReadyWrite ()
 We can write to the socket (used to detect a succesfull connection)
 
void setLocal (bool loc)
 Set whether this is a local peer.
 
Uint32 supportedExtensions () const
 Flags indicating which extensions are supported.
 

Static Public Member Functions

static bool isFirewalled ()
 
static void setFirewalled (bool Firewalled)
 

Protected Member Functions

void handshakeReceived (bool full) override
 
void onFinish (bool succes) override
 
- Protected Member Functions inherited from bt::AuthenticateBase
void makeHandshake (bt::Uint8 *buf, const SHA1Hash &info_hash, const PeerID &our_peer_id)
 
void sendHandshake (const SHA1Hash &info_hash, const PeerID &our_peer_id)
 

Additional Inherited Members

- Protected Slots inherited from bt::AuthenticateBase
void onError (int err)
 
void onTimeout ()
 
- Protected Attributes inherited from bt::AuthenticateBase
Uint32 bytes_of_handshake_received
 
Uint32 ext_support
 
bool finished
 
Uint8 handshake [68]
 
bool local
 
mse::EncryptedPacketSocket::Ptr sock
 
QTimer timer
 

Detailed Description

Author
Joris Guisson

Handles the authentication of incoming connections on the Server. Once the authentication is finished, the socket gets handed over to the right PeerManager.

Definition at line 53 of file serverauthenticate.h.

Member Function Documentation

◆ handshakeReceived()

void bt::ServerAuthenticate::handshakeReceived ( bool  full)
overrideprotectedvirtual

The other side send a handshake. The first 20 bytes of the handshake will already have been checked.

Parameters
fullIndicates whether we have a full handshake if this is not full, we should just send our own

Implements bt::AuthenticateBase.

◆ onFinish()

void bt::ServerAuthenticate::onFinish ( bool  succes)
overrideprotectedvirtual

Authentication finished.

Parameters
succesSucces or not

Implements bt::AuthenticateBase.


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