txtorcon.interface Module

Note: the Onion interfaces are defined in Onion APIs


interface txtorcon.interface.IStreamAttacher

Used by txtorcon.TorState to map streams to circuits (see txtorcon.TorState.set_attacher()).

Each time a new txtorcon.Stream is created, this interface will be queried to find out which txtorcon.Circuit it should be attached to.

Only advanced use-cases should need to use this directly; for most users, using the txtorcon.Circuit.stream_via() interface should be preferred.


interface txtorcon.interface.IStreamListener

Notifications about changes to a txtorcon.Stream.

If you wish for your listener to be added to all new streams, see txtorcon.TorState.add_stream_listener().


interface txtorcon.interface.ICircuitListener

An interface to listen for updates to Circuits.


interface txtorcon.interface.ICircuitContainer

An interface that contains a bunch of Circuit objects and can look them up by id.


interface txtorcon.interface.IRouterContainer


interface txtorcon.interface.ITorControlProtocol

This defines the API to the TorController object.

This is the usual entry-point to this library, and you shouldn’t need to call methods outside this interface.