> On Nov 13, 2014, at 1:15 PM, Peter Westlake <peter.westl...@pobox.com> wrote:
>
> I've had a look at the code, and got rather lost amongst the interfaces
> and inheritance and protocols and transports. If someone can help me
> narrow down the relevant bits of code, I can put in some Python tracing.
>
I could describe all the interfaces and inheritance and protocols and
transports, but since you don't want to puzzle out all that code, presumably
such a description would be overly complex :).
A good place to start would be to figure out if the data is getting to Twisted
at all, which means instrumenting your Protocol.
If you've done the default thing, and just done class Something(AMP):, this
means you should override dataReceived, like so:
from __future__ import print_function
from twisted.protocols.amp import AMP
class MyAMP(AMP, object):
def dataReceived(self, data):
print("Got some data", repr(data))
return super(MyAMP, self).dataReceived(data)
If you're not seeing anything, that will give you an idea of whether your
kernel is not actually delivering that data to Twisted.
There are, of course, a plethora of other things that could be going wrong -
maybe your Twisted program is stuck in some blocking function elsewhere and the
reactor loop isn't running at all, maybe you're using some policy wrapper which
is buffering incorrectly... but that's a good sanity check to start with.
-glyph
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python