[tor-bugs] #7152 [Stem]: Implement Controller.attach_stream

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Dec 15 16:37:45 UTC 2012


#7152: Implement Controller.attach_stream
------------------------+---------------------------------------------------
 Reporter:  neena       |          Owner:  atagar           
     Type:  task        |         Status:  needs_information
 Priority:  normal      |      Milestone:                   
Component:  Stem        |        Version:                   
 Keywords:  controller  |         Parent:                   
   Points:              |   Actualpoints:                   
------------------------+---------------------------------------------------

Comment(by robinson):

 Replying to [comment:6 neena]:

 Ravi,

 > > but I don't have a strong opinion about that.
 >
 > Me too.

 Your get_circuits() method is probably the best way within the current
 code.  I have written a similar method for a desktop controller and ended
 up parsing the get_info() response myself.  At least your approach re-uses
 good, tested code.

 I think the best long-term method would be to move the re-usable parts
 from CircuitEvent to (maybe) stem.response.CircuitEntry, then make
 CircuitEvent and Controller.get_circuit() into wrappers for the new
 function.  See how stem.descriptor.router_status_entry works with
 NetworkStatusEvent and get_network_status().  But, this may not fit within
 your plans.

 If you do the same treatment for get_info("stream-status"), my controller
 can become just a lightweight gui wrapping Stem. 8-)

 Just as style feedback...  Do we want to standardize on using circuit_id
 and stream_id as var names?  I see that repurpose_circuit(),
 extend_circuit(), close_circuit(), and attach_stream() each use circuit or
 circuit_id.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7152#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list