I'm writing a client in Python and trying to download the consensus. I managed to establish a single-hop connection to an authority server, send the HTTP request, and receive almost all the consensus bytes.

I periodically send SENDME cells for telling the remote server that I want to receive more data cells and I guess I correctly maintain the 2 window counters. However, I don't receive the very last data cells from the authority. For these ones, I have to send a last SENDME cell without following the window thresholds specified in the spec. In other words, I send a SEND_ME cell when circ_window < 900 or stream_window <= 450 . However, I noticed that the last data cells require me to send a last SENDME cell without respecting these thresholds.

That's a problem because I have to guess that I'm waiting for the last data cells by setting a timeout in my program then send a final SENDME cell, which is not efficient at all.

Is there an efficient way to force the remote node sending all the data I requested without trying to guess there is not much data left ?

Your Answer

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

Browse other questions tagged or ask your own question.