Authenicate a peer.
More...
#include <authenticate.h>
|
|
void | stop () |
| | Stop the authentication.
|
| |
|
| | Authenticate (const net::Address &addr, TransportProtocol proto, const SHA1Hash &info_hash, const PeerID &peer_id, PeerConnector::WPtr pcon) |
| |
|
const PeerID & | getPeerID () const |
| |
|
bool | isSuccesfull () const |
| | See if the authentication is succesfull.
|
| |
|
| 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.
|
| |
|
|
void | onReadyRead () override |
| |
|
void | onReadyWrite () override |
| |
|
void | onError (int err) |
| |
|
void | onTimeout () |
| |
|
|
net::Address | addr |
| |
|
SHA1Hash | info_hash |
| |
|
PeerID | our_peer_id |
| |
|
PeerConnector::WPtr | pcon |
| |
|
PeerID | peer_id |
| |
|
net::Socks * | socks |
| |
|
bool | succes |
| |
|
Uint32 | bytes_of_handshake_received |
| |
|
Uint32 | ext_support |
| |
|
bool | finished |
| |
|
Uint8 | handshake [68] |
| |
|
bool | local |
| |
|
mse::EncryptedPacketSocket::Ptr | sock |
| |
|
QTimer | timer |
| |
- Author
- Joris Guisson After we connect to a peer, we need to authenticate the peer. This class handles this.
Definition at line 46 of file authenticate.h.
◆ Authenticate()
| bt::Authenticate::Authenticate |
( |
const net::Address & |
addr, |
|
|
TransportProtocol |
proto, |
|
|
const SHA1Hash & |
info_hash, |
|
|
const PeerID & |
peer_id, |
|
|
PeerConnector::WPtr |
pcon |
|
) |
| |
Connect to a remote host first and authenicate it.
- Parameters
-
| addr | Address to connect to |
| proto | Transport protocol to use |
| info_hash | Info hash |
| peer_id | Peer ID |
| pman | PeerManager |
◆ handshakeReceived()
| void bt::Authenticate::handshakeReceived |
( |
bool |
full | ) |
|
|
overrideprotectedvirtual |
The other side send a handshake. The first 20 bytes of the handshake will already have been checked.
- Parameters
-
| full | Indicates whether we have a full handshake if this is not full, we should just send our own |
Implements bt::AuthenticateBase.
◆ onFinish()
| void bt::Authenticate::onFinish |
( |
bool |
succes | ) |
|
|
overrideprotectedvirtual |
The documentation for this class was generated from the following file: