[Twisted-Python] client connecting to 2 servers (non simultaneously)

2011-01-11 Thread benjamin.bertrand
Hi, I'm new to twisted and I have started to write a new protocol with a TCP client and server. In my protocol, a client should be able to connect to 2 servers (master/slave node - only the master accepts connection). The client should try to connect to server1. If it fails, try to connect to serv

Re: [Twisted-Python] client connecting to 2 servers (nonsimultaneously)

2011-01-12 Thread benjamin.bertrand
Nice, this looks much cleaner. I thought about the connection "lost" case. It's quite similar to "fail" (but client should always try to reconnect to host1 in that case). So easy to implement. Thanks a lot! Benjamin Från: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python-boun...@

Re: [Twisted-Python] client connecting to 2 servers (nonsimultaneously)

2011-01-12 Thread benjamin.bertrand
One small question about the following code: Why did you use reactor.callWhenRunning in the __init__ method? Why not calling directly reactor.connectTCP? Cheers, Benjamin Från: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python-boun...@twistedmatrix.com] För Jason Rennie Skickat: d

Re: [Twisted-Python] client connecting to 2 servers (nonsimultaneously)

2011-01-13 Thread benjamin.bertrand
No need to apologize Jason :-) Got a lot of useful information in this thread! Thanks! Benjamin Från: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python-boun...@twistedmatrix.com] För Jason Rennie Skickat: den 12 januari 2011 16:52 Till: Twisted general discussion Ämne: Re: [Twisted

[Twisted-Python] Design advice

2011-01-14 Thread benjamin.bertrand
Hi, I'm trying to do a proof of concept and need some advice about the design. We today have an external system sending messages to several of our tests systems (one specific connection per system). We'd like to get our own server for more flexibility (easily setup connection to a new system, fi

Re: [Twisted-Python] Design advice

2011-01-17 Thread benjamin.bertrand
-Ursprungligt meddelande- Från: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python-boun...@twistedmatrix.com] För Michael Thompson Skickat: den 15 januari 2011 14:17 Till: Twisted general discussion Ämne: Re: [Twisted-Python] Design advice > On 14 January 2011 14:56, wrote: