[Twisted-Python] Explicitly closing an AMP connection?
Christopher Armstrong
radix at twistedmatrix.com
Wed Apr 16 11:37:45 MDT 2008
On Wed, Apr 16, 2008 at 1:23 PM, Nathan <nathan.stocks at gmail.com> wrote:
> What's the "twisted" way of cleanly closing an AMP connection? The
> closest thing I can find on
>
> http://twistedmatrix.com/documents/current/api/twisted.protocols.amp.AMP.html
>
> is stopProducing() -- but it's undocumented. Will that kill the connection?
The way to close the connection is transport.loseConnection. For
future reference, this is the same for any Twisted protocol. The
transport is in the 'transport' attribute of the protocol.
--
Christopher Armstrong
International Man of Twistery
http://radix.twistedmatrix.com/
http://twistedmatrix.com/
http://canonical.com/
More information about the Twisted-Python
mailing list