[Twisted-Python] Reconnection to Serialport after connectionLost
Rene Klootwijk
rene at klootwijk.org
Mon Aug 1 12:21:05 EDT 2011
I have copied a code snippit to pastebin, <http://pastebin.com/us4vL0bk>
http://pastebin.com/us4vL0bk
This is what happens:
When I break the connection, the connectionLost event is triggered and the
connectionLost method of the protocol class is called. After a 5 second
delay the serialport is reopened successfully because I reconnected the
device. The connectionMade event is triggered and the connectionMade method
of the protocol class is called. However, data arriving on the serial port
no longer triggers the dataReceived event.
--
Rene
From: twisted-python-bounces at twistedmatrix.com
[mailto:twisted-python-bounces at twistedmatrix.com] On Behalf Of Laurens Van
Houtven
Sent: maandag 1 augustus 2011 1:37
To: Twisted general discussion
Subject: Re: [Twisted-Python] Reconnection to Serialport after
connectionLost
Have you tried ReconnectingClientFactory?
http://twistedmatrix.com/documents/current/api/twisted.internet.protocol.Rec
onnectingClientFactory.html
(Also, could you pastebin some code? What you're describing ought to work.)
--
cheers
lvh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20110801/52fb0014/attachment.htm
More information about the Twisted-Python
mailing list