0

I have read the document of Stem. I notice that new_circuit() and extend_circuit() can create new circuit.However,I have two problems:

  1. I can't make sure when I create a new circuit, will the old circuit be killed, because I notice the circuit's life-time just 10 minutes. I mean will there be 2 circuits after I created a new one?
  2. If the previous circuit can be used after I create new circuit. Assume that I have created 5 new circuits and I want to send 4G-size file, to improve transmission efficiency ,how can I use these 5 circuits to transmit data together at the same time? I mean let the five circuits transmit the data of this file at the same time, instead of using one of them for a while, and switch to another circuit.(so I can't just use attach_stream() and controller.set_conf('__LeaveStreamsUnattached', '1') to attach the stream to one circuit like

How to assign a stream to a circuit?

Can anybody help me figure out two question?Thanks!

0
  1. Yes, you will then have two circuits, and it will take some time for the previous circuit to be automatically cleaned up. A Stem controller does have a close_circuit(id) function you can use to close a circuit manually.
  2. You cannot use multiple circuits to send data over a single connection. You can only do something like this if the server supports sending data over multiple connections with something like multipath TCP. If you have access to the server, you could also break your file locally into small chunks, send those separately to the server, and then reassemble them into a single file on the server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.