RFC: add close_stream method to Controller
Damian,
I have finally settled on what I think is a reasonable approach to StreamClosureReason (SCR) and RelayEndReason (RER) enums. But I am still working on tests for close_stream, so RFC for now.
-
Does my handling of the *Reason enums work for you? My research in the tor source and torspec indicates that the reasons the tor process sends in the STREAM event are direct mappings of the reason the relay ended. Except, with STREAM (FAILED|CLOSED|DETACHED), REASON=END and the "real" reason is in REMOTE_REASON.
-
How do you feel about adding the SocksiPy http://sourceforge.net/projects/socksipy/ module under test/ ? This is a BSD-licensed module that I hope will make stream-using integ tests possible. But I have not yet tried, so maybe it won't help.
This work is in the exp-close-stream-v1 branch on git://gitorious.org/stem-robinson/stem-robinson.git and commit logs can be read at https://gitorious.org/stem-robinson/stem-robinson/commits/exp-close-stream-v1
Trac:
Username: robinson