pybitmessage.network package

Network subsystem packages

BMConnectionPool()[source]

Pool of all existing connections

Dandelion()[source]

Dandelion class for tracking stem/fluff stages.

class AddrThread(name=None)[source]

Bases: pybitmessage.network.threads.StoppableThread

(Node) address broadcasting thread

name = 'AddrBroadcaster'
run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class AnnounceThread(name=None)[source]

Bases: pybitmessage.network.threads.StoppableThread

A thread to manage regular announcing of this node

name = 'Announcer'
announceInterval = 60
run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

static announceSelf()

Announce our presence

class BMNetworkThread(name=None)[source]

Bases: pybitmessage.network.threads.StoppableThread

Main network thread

name = 'Asyncore'
run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

stopThread()

Stop the thread

class DownloadThread[source]

Bases: pybitmessage.network.threads.StoppableThread

Thread-based class for downloading from connections

minPending = 200
maxRequestChunk = 1000
requestTimeout = 60
cleanInterval = 60
requestExpires = 3600
cleanPending()

Expire pending downloads eventually

run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class InvThread(name=None)[source]

Bases: pybitmessage.network.threads.StoppableThread

Main thread that sends inv annoucements

name = 'InvBroadcaster'
static handleLocallyGenerated(stream, hashId)

Locally generated inventory items require special handling

run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class ReceiveQueueThread(num=0)[source]

Bases: pybitmessage.network.threads.StoppableThread

This thread processes data received from the network (which is done by the asyncore thread)

run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class UploadThread(name=None)[source]

Bases: pybitmessage.network.threads.StoppableThread

This is a thread that uploads the objects that the peers requested from me

maxBufSize = 2097152
name = 'Uploader'
run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class StoppableThread(name=None)[source]

Bases: threading.Thread

Base class for application threads with stopThread method

logger = <logging.Logger object>
name = None
stopThread()

Stop the thread