[Twisted-Python] Is AMP a bidirectional protocol?

Nathan nathan.stocks at gmail.com
Wed Feb 27 12:57:03 EST 2008

Is the AMP protocol bidirectional (beyond the response you get to each
message)?  I'm really new to Twisted, and I followed the ampserver.py
and ampclient.py examples to get an AMP connection working, because
someone suggested that to me as an easy protocol to start with.
Although sending a message from the client to the server works fine, I
can't figure out how to initiate a message from the server to the
client over the connection that the client initially created.

I'm working on a little project where the "server" and the "client"
actually need to talk more like peers where each can initiate a
message to the other.  The server is outside the NAT, so it'd be best
if the communication could happen both ways over the connection that
the client initiates.

Could someone point me in the right direction?  I can provide my
existing code if that makes any difference.

~ Nathan

More information about the Twisted-Python mailing list