[Twisted-Python] Multiple clients and ports

2013-04-18 Thread Carlos Eduardo Sotelo Pinto
I am doing a gps tracker wich use multiple protocols and multiple clients, my problen is when I have more than one client on more than one protocol at the same time, data and validation start to crashing one to other My Server is #!/usr/bin/env python # -*- coding: utf-8 -*- Heracles Tracker

Re: [Twisted-Python] Multiple clients

2010-06-18 Thread Szabolcs Balogh
I have used the following code, which is working until I called it multiple time: class ImapProtocol(twisted.mail.imap4.IMAP4Client): ... implementation ... class ImapFactory(twisted.internet.protocol.ClientFactory): def __init__(self, account):

Re: [Twisted-Python] Multiple clients

2010-06-18 Thread Phil Mayers
On 18/06/10 15:34, Szabolcs Balogh wrote: def get_mailbox_list(self): twisted.internet.reactor.run() The reactor isn't restartable. You can only start it once. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com

Re: [Twisted-Python] Multiple clients

2010-06-18 Thread Szabolcs Balogh
On Friday 18 June 2010 17:49:27 Phil Mayers wrote: On 18/06/10 15:34, Szabolcs Balogh wrote: def get_mailbox_list(self): twisted.internet.reactor.run() The reactor isn't restartable. You can only start it once. ___

Re: [Twisted-Python] Multiple clients

2010-06-18 Thread Jason J. W. Williams
Couldn't you use callLater to fire the first account check every N interval and then just attach the subsequent accounts for that interval as callbacks to the first check inside your callLater func? -J On Fri, Jun 18, 2010 at 9:25 AM, Szabolcs Balogh bszabo...@gmail.com wrote: On Friday 18 June

Re: [Twisted-Python] Multiple clients

2010-06-18 Thread Phil Mayers
On 18/06/10 16:25, Szabolcs Balogh wrote: On Friday 18 June 2010 17:49:27 Phil Mayers wrote: On 18/06/10 15:34, Szabolcs Balogh wrote: def get_mailbox_list(self): twisted.internet.reactor.run() The reactor isn't restartable. You can only start it once.

Re: [Twisted-Python] Multiple clients

2010-06-18 Thread Itamar Turner-Trauring
It sounds good, but if I don't call reactor.run() after connectSSL doesn't happens anything... If I call reactor.run() after connectSSL, it works properly... There are two types of client connections: 1. Connections you open when you first run the program. Call these before reactor.run() is

Re: [Twisted-Python] Multiple clients

2010-06-18 Thread Szabolcs Balogh
On Friday 18 June 2010 20:25:50 Itamar Turner-Trauring wrote: It sounds good, but if I don't call reactor.run() after connectSSL doesn't happens anything... If I call reactor.run() after connectSSL, it works properly... There are two types of client connections: 1. Connections you open

Re: [Twisted-Python] Multiple clients

2010-06-18 Thread Jason J. W. Williams
If you're not using twistd to launch your app you'll have to run reactor.run(). Otherwise, the eventloop won't ever start. In terms of exposing something like get_messages()...couldn't that issue the callLater with a very tiny value? Or issue the first connectTCP, which the others chained via

Re: [Twisted-Python] Multiple clients

2010-06-18 Thread Kevin Horn
On Fri, Jun 18, 2010 at 12:55 PM, Szabolcs Balogh bszabo...@gmail.comwrote: It is possible to: - start the reactor when I initialize my program (eg. in main) - call connectTCP or connectSSL when I want and every time I want? Yes, this is exactly what you are supposed to do. Call the