|
libktorrent
2.1.1
|
#include <authenticatebase.h>

Public Member Functions | |
| 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. | |
Protected Slots | |
| void | onError (int err) |
| void | onTimeout () |
Protected Member Functions | |
| virtual void | handshakeReceived (bool full)=0 |
| void | makeHandshake (bt::Uint8 *buf, const SHA1Hash &info_hash, const PeerID &our_peer_id) |
| virtual void | onFinish (bool succes)=0 |
| void | sendHandshake (const SHA1Hash &info_hash, const PeerID &our_peer_id) |
Protected Attributes | |
| Uint32 | bytes_of_handshake_received |
| Uint32 | ext_support |
| bool | finished |
| Uint8 | handshake [68] |
| bool | local |
| mse::EncryptedPacketSocket::Ptr | sock |
| QTimer | timer |
Base class for authentication classes. This class just groups some common stuff between Authenticate and ServerAuthentciate. It has a socket, handles the timing out, provides a function to send the handshake.
Definition at line 60 of file authenticatebase.h.
|
protectedpure virtual |
The other side send a handshake. The first 20 bytes of the handshake will already have been checked.
| full | Indicates whether we have a full handshake if this is not full, we should just send our own |
Implemented in bt::ServerAuthenticate, and bt::Authenticate.
|
protected |
Fill in the handshake in a buffer.
|
protectedpure virtual |
Authentication finished.
| succes | Succes or not |
Implemented in bt::ServerAuthenticate, and bt::Authenticate.
|
protected |
Send a handshake
| info_hash | The info_hash to include |
| our_peer_id | Our PeerID |
1.8.18