[Twisted-Python] AMP message length limit

Oon-Ee Ng ngoonee.talk at gmail.com
Mon Nov 23 19:58:03 MST 2015


On Tue, Nov 24, 2015 at 9:16 AM, Oon-Ee Ng <ngoonee.talk at gmail.com> wrote:
>
> Thanks, right now I just have plenty of return {} everywhere. Does
> requiresAnswer=False mean less bandwidth usage (no need to transmit an
> empty dict)?

Having read the documentation a bit, it appears requiresAnswer=False
is a hint and I'd still have to return the correct response (in this
case an empty dict)

http://twistedmatrix.com/trac/ticket/1985 and in particular the
following comment by yourself:-

Responders for Commands defined not to require a response should
return a valid response nonetheless, because requiresAnswer is an
optimization hint that the client can specify, on any request whose
response it will not process, to optimize network traffic.

Looks like I'll update my clients to specify it then. Was thinking it
should be specified when defining message classes.




More information about the Twisted-Python mailing list