Re: [Twisted-Python] Help with trial test failure

2013-08-07 Thread Benjamin BERTRAND
Le 7 août 2013 à 04:42, Piper Masden a écrit : > On Tue, Aug 6, 2013 at 2:33 PM, Benjamin BERTRAND wrote: > > I guess it's possible to use a synthetic transport, but that wouldn't help > much without a "fake" redis server. > That would indeed be nice to hav

Re: [Twisted-Python] Help with trial test failure

2013-08-06 Thread Benjamin BERTRAND
Le 6 août 2013 à 08:28, Glyph a écrit : > > On Aug 5, 2013, at 2:09 AM, Benjamin BERTRAND wrote: > >> That's why the inlineCallbacks solves the problem. When I yield on the >> self.server.dataReceived, I wait for the deferred in the publish methods to >> fir

Re: [Twisted-Python] Help with trial test failure

2013-08-05 Thread Benjamin Bertrand
On Sun, Aug 4, 2013 at 7:55 PM, Itamar Turner-Trauring wrote: > On 08/04/2013 10:25 AM, Benjamin BERTRAND wrote: > >> Hi, >> >> I'm trying to write a simple gateway to receive messages using a specific >> protocol and publish/store them using txredis. >> I

Re: [Twisted-Python] Help with trial test failure

2013-08-04 Thread Benjamin BERTRAND
Le 4 août 2013 à 21:55, Itamar Turner-Trauring a écrit : > On 08/04/2013 10:25 AM, Benjamin BERTRAND wrote: >> Hi, >> >> I'm trying to write a simple gateway to receive messages using a specific >> protocol and publish/store them using txredis. >> I wr

[Twisted-Python] Help with trial test failure

2013-08-04 Thread Benjamin BERTRAND
Hi, I'm trying to write a simple gateway to receive messages using a specific protocol and publish/store them using txredis. I wrote a small example that seems to work. But the small test I wrote fails: $ trial gateway/test gateway.test.test_example GatewayServiceTestCase test_messageRecei

Re: [Twisted-Python] How to dispatch message to different servers

2013-03-02 Thread Benjamin BERTRAND
Le 2 mars 2013 à 19:12, Tom Prince a écrit : > Benjamin BERTRAND writes: > >> Le 2 mars 2013 à 15:33, Laurens Van Houtven <_...@lvh.cc> a écrit : >> >>> I'm guessing that this is another question that will be solved as >>> soon as I see th

Re: [Twisted-Python] How to dispatch message to different servers

2013-03-02 Thread Benjamin BERTRAND
x27;t think I can share)... > > > On Sat, Mar 2, 2013 at 3:25 PM, Benjamin BERTRAND wrote: > > Le 2 mars 2013 à 14:53, Laurens Van Houtven <_...@lvh.cc> a écrit : > >> Ah, but that too appears to be missing in the original code ;-) >> >> The stuff

Re: [Twisted-Python] How to dispatch message to different servers

2013-03-02 Thread Benjamin BERTRAND
packet? If I had only one server yes. But the thing is I have to send the message to a different server depending on the line id. That was my initial problem. I don't see how I could call the sendMessage method corresponding to a specific server directly. Or? > > > On Sat, Mar

Re: [Twisted-Python] How to dispatch message to different servers

2013-03-02 Thread Benjamin BERTRAND
-arm the deferred self.factory.deferred[self.line] = defer.Deferred() self.factory.deferred[self.line].addCallback(self.messageToSend) > On Mar 2, 2013 9:50 AM, "Benjamin BERTRAND" wrote: > > Le 2 mars 2013 à 04:34, exar...@twistedmatrix.com a écrit : > > >

Re: [Twisted-Python] How to dispatch message to different servers

2013-03-02 Thread Benjamin BERTRAND
Le 2 mars 2013 à 04:34, exar...@twistedmatrix.com a écrit : > On 1 Mar, 09:52 pm, bee...@gmail.com wrote: >> Thanks for the answer! >> >> I was hoping to avoid having to put something like AMP in place, >> because it looked a bit overkill for my case. >> I think I actually found a way :-) > >

Re: [Twisted-Python] How to dispatch message to different servers

2013-03-02 Thread Benjamin BERTRAND
Le 1 mars 2013 à 23:27, Glyph a écrit : > > On Mar 1, 2013, at 1:52 PM, Benjamin BERTRAND wrote: > >> I was hoping to avoid having to put something like AMP in place, because it >> looked a bit overkill for my case. >> I think I actually found a way :-) > &g

Re: [Twisted-Python] How to dispatch message to different servers

2013-03-01 Thread Benjamin BERTRAND
pecific name), and > something close to > self.servers[serverFor(packet.origin)].callRemote(HandlePacket, packet.data), > or whatever. > > I realize this is still pretty vague and high level, so feel free to ask more > questions about the parts that are unclear :) > > &g

[Twisted-Python] How to dispatch message to different servers

2013-02-28 Thread Benjamin BERTRAND
Hi, I have to replace a piece of software that sniffs the traffic on one interface. It gets different messages that are each associated to a specific emitter. On the same machine, one server is started for each emitter (on a different port). And the application is just supposed to use the proper