On Tue, Nov 24, 2015 at 10:58 AM, Oon-Ee Ng <ngoonee.t...@gmail.com> wrote: > On Tue, Nov 24, 2015 at 9:16 AM, Oon-Ee Ng <ngoonee.t...@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.
And it looks like I do have to specify it in defining message classes. And furthermore that when I do that, callRemote no longer returns a deferred (which makes sense, really) and instead gets a None. One more check before I add my default errBacks then. Optimised network traffic sounds positive, at the least (I assume this means one less transmission since it effectively makes the AMP one-way for the messages which have this set to False). _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python