|
|
__init__(self,
connecter,
raw_server,
my_id,
max_len,
schedulefunc,
keepalive_delay,
download_id,
measurefunc,
config,
bans=<DebTorrent.BT1.Encrypter._dummy_banlist instance at 0x2b55198...)
Initialize the instance. |
source code
|
|
|
|
send_keepalives(self)
Periodically send keepalive messages on all the connections. |
source code
|
|
|
|
|
|
|
_start_connection_from_queue(self)
Start a connection in the queue. |
source code
|
|
boolean
|
|
|
|
|
boolean
|
check_ip(self,
connection=None,
ip=None)
Check whether the connection to the IP is allowed. |
source code
|
|
boolean
|
got_id(self,
connection)
Check whether the connection to the peer ID is allowed. |
source code
|
|
boolean
|
|
boolean
|
|
|
|
close_all(self)
Close all the currently open connections. |
source code
|
|
|
|
ban(self,
ip)
Ban an IP address from ever connecting again. |
source code
|
|
|
|
|
dictionary
|
banned
keys are IP addresses that are banned
|
dictionary
|
config
the configuration parameters
|
|
Connecter.Connecter
|
connecter
the Connecter instance to use
|
dictionary
|
connections
keys are the DebTorrent.SocketHandler.SingleSocket connections,
values are the corresponding Connection instances
|
string
|
download_id
the infohash of the torrent being downloaded
|
class
|
external_bans
the instance to check for banned peer's in
|
int
|
keepalive_delay
the delay between sending keepalive messages
|
int
|
max_connections
the maximum number of connections to accept
|
int
|
max_len
the maximum length message to accept
|
method
|
measurefunc
method to call with the size of incoming data
|
string
|
my_id
the peer ID to use
|
boolean
|
paused
whether the download is paused
|
|
DebTorrent.RawServer.RawServer
|
raw_server
the server instance to use
|
method
|
schedulefunc
method to call to schedule future function invocation
|
list of ((string, int),
string, boolean)
|
to_connect
the list of IP address, port, peer ID, and whether to encrypt
|