[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #8605 [Stem]: Autodetect response type in ControlMessage.from_str()
#8605: Autodetect response type in ControlMessage.from_str()
----------------------------+-----------------------------------------------
Reporter: atagar | Owner: atagar
Type: enhancement | Status: reopened
Priority: normal | Milestone:
Component: Stem | Version:
Resolution: | Keywords: controller easy
Parent: | Points:
Actualpoints: |
----------------------------+-----------------------------------------------
Changes (by meejah):
* status: closed => reopened
* resolution: wontfix =>
Comment:
For the "synchronous" (non-650) responses, you will have exactly one
outstanding request -- could this be provided as a "hint" (defaulting to
None)? Then for any 650 messages, you can autodetect, and for anything
else if the hint is None it's an error (or not convert()-ed?) and
otherwise the hint is used to determine the correct type?
Then, callers simply provide the outstanding message as the hint (if they
don't have one, they use None and it'll "just work").
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8605#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs