Re: [Twisted-Python] Get IP of connecting client in XMLRPC server

2013-04-28 Thread Attila Nagy
On 06/11/04 16:56, Remy C. Cool wrote: > On Friday 11 June 2004 16:35, Itamar Shtull-Trauring wrote: >> On Fri, 2004-06-11 at 09:34, Remy C. Cool wrote: >>> I'm currently in the process of changing from a customized >>> SimpleXMLRPCServer to a twisted XMLRPC server solution and I need >>> to insert

Re: [Twisted-Python] Is this possible to catch this error? (returned by protocols/memcached.py)

2011-06-03 Thread Attila Nagy
Hi, On 06/03/11 15:57, exar...@twistedmatrix.com wrote: > > Using a global protocol instance like this is error prone. >> return p >> >> def memc(): >> factory = MemCacheFactory() >> reactor.connectTCP('localhost', 11211, factory) >> reactor.callLater(1,query) > > What if the c

[Twisted-Python] Is this possible to catch this error? (returned by protocols/memcached.py)

2011-06-03 Thread Attila Nagy
Hi, Here's a sample application, which gets a key from memcached: from twisted.internet import reactor, protocol, defer from twisted.application import internet, service from twisted.protocols.memcache import MemCacheProtocol, DEFAULT_PORT mc = None class MemCacheFactory(protocol.ReconnectingCli

Re: [Twisted-Python] What's the purpose of __?

2011-02-16 Thread Attila Nagy
s about double-underscore: http://docs.python.org/tutorial/classes.html#private-variables Jason On Tue, Feb 15, 2011 at 5:36 AM, Attila Nagy <mailto:b...@fsn.hu>> wrote: Hi, I'm trying to do an LMTP implementation based on smtp.py and came to the issue of class

Re: [Twisted-Python] What's the purpose of __?

2011-02-16 Thread Attila Nagy
On 02/15/2011 11:03 PM, Phil Christensen wrote: > On Feb 15, 2011, at 5:36 AM, Attila Nagy wrote: >> Hi, >> >> I'm trying to do an LMTP implementation based on smtp.py and came to the >> issue of class private variables with double underscores. >> Exam

[Twisted-Python] What's the purpose of __?

2011-02-15 Thread Attila Nagy
Hi, I'm trying to do an LMTP implementation based on smtp.py and came to the issue of class private variables with double underscores. Examples: http://twistedmatrix.com/trac/browser/trunk/twisted/mail/smtp.py#L746 http://twistedmatrix.com/trac/browser/trunk/twisted/mail/smtp.py#L815 and a lot of

Re: [Twisted-Python] Is AMP secure enough for the internet?

2010-03-01 Thread Attila Nagy
Eric P. Mangold wrote: > AMP "keys" are limited to 256 bytes and "values" are limited to 64k. So > that will prevent your program from handling a malformed AMP packet that > tries to exceed those limits > Yes, I know that from the docs, but I haven't read the code, and it's not trivial where

[Twisted-Python] Is AMP secure enough for the internet?

2010-02-27 Thread Attila Nagy
Hello, I'm planning a data collector gateway and wondering whether Twisted's AMP would be good for the task. AMP seems to be a good fit for the job, but I'm not sure about the security. I make the client side too, but I won't operate it, bad guys can take over that side and I want to protect my si

Re: [Twisted-Python] Handling exceptions in twisted.internet.udp?

2010-02-08 Thread Attila Nagy
exar...@twistedmatrix.com wrote: >> [snip] >> "/usr/lib64/python2.6/site-packages/Twisted-9.0.0_r27775-py2.6-linux- >> x86_64.egg/twisted/internet/udp.py", >> line 109, in doRead >>data, addr = self.socket.recvfrom(self.maxPacketSize) >>socket.error: [Errno 113] No route to hos

[Twisted-Python] Handling exceptions in twisted.internet.udp?

2010-02-08 Thread Attila Nagy
Hello, I have a code, which opens persistent (connected, see: http://twistedmatrix.com/documents/current/core/howto/udp.html#auto2) UDP connections, and sends and receives data on them. The problem is that occasionally I receive ICMP 13 (administratively prohibited) errors from the destination

Re: [Twisted-Python] Processpool recommendation (for scaling to multiple CPUs)

2009-05-27 Thread Attila Nagy
gl...@divmod.com wrote: > On 08:21 pm, b...@fsn.hu wrote: > >> I've got some CPU scalability issues (the application became CPU bound, >> but there are a lot more CPUs, which can't be used because of the >> uniprocess nature), threading is not a solution, so the next logical >> move could be sta

[Twisted-Python] Processpool recommendation (for scaling to multiple CPUs)

2009-05-24 Thread Attila Nagy
Hello, Is there any efficient built-in machinery in twisted for running a (TCP, UDP or unix domain socket) service in a connection multiplexer->worker processes manner? Or if there isn't, what is the recommended way of doing this? (any examples maybe?) I've got some CPU scalability issues (the