During initial development, unMessage did not use Twisted and there wasn't a notion of a reactor. When Twisted started to be used, I chose to run the reactor in one of the methods of Peer and that is completely wrong. The Peer() constructor should receive a reactor installed by whatever is instantiating it. The CLI should install the reactor and be implemented as in carml's console.
During initial development, unMessage did not use Twisted and there wasn't a notion of a reactor. When Twisted started to be used, I chose to run the reactor in one of the methods of
Peer
and that is completely wrong. ThePeer()
constructor should receive a reactor installed by whatever is instantiating it. The CLI should install the reactor and be implemented as in carml's console.