[Twisted-Python] ClientFactory: implementing Request/Response with a persistent connection

2011-02-02 Thread Wolfgang Powisch
Hello, I need to talk to a Line-based TCP service from a Twisted Application. The remote server will accept requests and send a response. I do NOT want to open a NEW TCP-Connection for each request. Are there any examples how to send concurrent requests over a single conenction ? .. so that my m

Re: [Twisted-Python] design of twisted application

2011-02-02 Thread Jason Rennie
On Wed, Feb 2, 2011 at 2:15 AM, Kurt Spindler wrote: > I am trying to design a twisted application, (I'm pretty new to twisted and > networking in general) and I feel like I'm not approaching it quite the > right way and would appreciate your feedback. First part, is that I am > trying to couple

Re: [Twisted-Python] design of twisted application

2011-02-02 Thread Lucas Taylor
On Feb 2, 2011, at 12:15 AM, Kurt Spindler wrote: Second question is that, in that other bunch of code, I need to be able to write things to the socket. How can I access the instance of my protocol subclass that is used by the factory, so I can make protocolInstance.transport.write type c

[Twisted-Python] ANNOUNCING Tahoe, the Least-Authority File System, v1.8.2

2011-02-02 Thread Zooko O'Whielacronx
ANNOUNCING Tahoe, the Least-Authority File System, v1.8.2 The Tahoe-LAFS team is pleased to announce the immediate availability of version 1.8.2 of Tahoe-LAFS, an extremely reliable distributed storage system. Get it here: http://tahoe-lafs.org/source/tahoe/trunk/docs/quickstart.html Tahoe-LAFS

Re: [Twisted-Python] Guidance needed on serial device interaction

2011-02-02 Thread Glyph Lefkowitz
On Feb 2, 2011, at 7:42 AM, Michael Thompson wrote: > On 2 February 2011 10:11, Jason Heeris wrote: >> On 2 February 2011 17:53, Albert Brandl wrote: >>> "string" could be interpreted as "complete message". It might e.g. happen >>> that a message arrives in three chunks. Each time a chunk is re

Re: [Twisted-Python] Guidance needed on serial device interaction

2011-02-02 Thread Michael Thompson
On 2 February 2011 10:11, Jason Heeris wrote: > On 2 February 2011 17:53, Albert Brandl wrote: >> "string" could be interpreted as "complete message". It might e.g. happen >> that a message arrives in three chunks. Each time a chunk is read, the >> dataReceived method is called. When it detects t

Re: [Twisted-Python] Guidance needed on serial device interaction

2011-02-02 Thread Jason Heeris
On 2 February 2011 17:53, Albert Brandl wrote: > "string" could be interpreted as "complete message". It might e.g. happen > that a message arrives in three chunks. Each time a chunk is read, the > dataReceived method is called. When it detects that the message is > complete, it calls stringReceiv

Re: [Twisted-Python] Guidance needed on serial device interaction

2011-02-02 Thread Albert Brandl
Hi! On Wed, Feb 02, 2011 at 04:58:30PM +0800, Jason Heeris wrote: > > The protocol dataReceived method will be called as  data arrives at > > the serial port once enough data has arrived to complete a message > > this method calls stringReceived with the complete message. > > I don't know what th

Re: [Twisted-Python] Guidance needed on serial device interaction

2011-02-02 Thread Jason Heeris
On 2 February 2011 15:58, Michael Thompson wrote: > The job of the protocol class is to assemble the bytes that you > receive into packets or messages. Ideally the protocol will have > characters that frame a message, and it sounds like you might have > this if > or ! is always sent at the end of

Re: [Twisted-Python] design of twisted application

2011-02-02 Thread Michael Thompson
On 2 February 2011 07:15, Kurt Spindler wrote: > Hey, > I am trying to design a twisted application, (I'm pretty new to twisted and > networking in general) and I feel like I'm not approaching it quite the > right way and would appreciate your feedback. First part, is that I am > trying to couple

Re: [Twisted-Python] Guidance needed on serial device interaction

2011-02-02 Thread Michael Thompson
On 2 February 2011 06:36, Jason Heeris wrote: > This is a bit long, sorry... > > I have a PyGTK program that uses threads and pyserial's blocking > methods to interact with an RS232 connected device. I'd like to throw > out the threading awfulness and redo it in Twisted, if possible, but > I'm a l