|
|
__init__(self,
resultfunc,
downloadid,
peerid,
ip,
port,
rawserver,
encrypted=True)
Initialize the instance and start a connection to the peer. |
source code
|
|
|
|
|
int, method
|
|
int, method
|
|
|
|
_start_crypto(self)
Setup the connection for encrypted communication. |
source code
|
|
int, method
|
|
boolean
|
|
int, method
|
|
int, method
|
|
int, method
|
|
int, method
|
|
int, method
|
|
int, method
|
|
int, method
|
|
|
None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean
|
_dc
whether encrypted connections have been disabled
|
int
|
_max_search
the number of remaining bytes to search for the pattern
|
string
|
buffer
the buffer of received data from the connection
|
boolean
|
closed
whether the connection has been closed
|
|
DebTorrent.SocketHandler.SingleSocket
|
connection
the connection to the peer
|
int
|
cryptmode
the type of encryption being used
|
string
|
downloadid
the info hash of the torrent to use
|
boolean
|
encrypted
whether to use an encrypted connection
|
|
DebTorrent.BTcrypto.Crypto
|
encrypter
the encrypter to use for the connection
|
string
|
ip
the IP of the peer being checked
|
method
|
next_func
the next method to use to process incoming data on the
connection
|
int
|
next_len
the next amount of data to read from the connection
|
string
|
peerid
the peer ID of the peer being checked
|
int
|
port
the port to connect to the peer on
|
method
|
read
the method to use to read from the connection
|
method
|
resultfunc
the method to call with the result when complete
|
method
|
write
the method to use to write to the connection
|