diff options
author | Roger Dingledine <arma@torproject.org> | 2009-10-10 15:07:37 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2009-10-10 15:07:37 -0400 |
commit | e84dc32cb837cd5ba805571dd6764d3d7913ab07 (patch) | |
tree | 5c118ac6933aa6f6b13771dcbe21ce707a4cdcc2 /doc/spec | |
parent | 1c62b9d5fa21a802f26579379bd7b5d0fc17af9c (diff) | |
download | tor-e84dc32cb837cd5ba805571dd6764d3d7913ab07.tar tor-e84dc32cb837cd5ba805571dd6764d3d7913ab07.tar.gz |
correct the spec for the stream_bw event.
"neonomad" pointed out on or-talk that the order is opposite from the
intuitive order. explain why. we chose to fix the spec rather than the
code because there are controllers like torflow that already expect
the current behavior.
Diffstat (limited to 'doc/spec')
-rw-r--r-- | doc/spec/control-spec.txt | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/doc/spec/control-spec.txt b/doc/spec/control-spec.txt index f968fa851..eb0164110 100644 --- a/doc/spec/control-spec.txt +++ b/doc/spec/control-spec.txt @@ -1597,17 +1597,21 @@ 4.1.13. Bandwidth used on an application stream The syntax is: - "650" SP "STREAM_BW" SP StreamID SP BytesRead SP BytesWritten CRLF - BytesRead = 1*DIGIT + "650" SP "STREAM_BW" SP StreamID SP BytesWritten SP BytesRead CRLF BytesWritten = 1*DIGIT + BytesRead = 1*DIGIT + + BytesWritten and BytesRead are the number of bytes written and read + by the application since the last STREAM_BW event on this stream. - BytesRead and BytesWritten are the number of bytes read and written since - the last STREAM_BW event on this stream. These events are generated about - once per second per stream; no events are generated for streams that have - not read or written. + Note that from Tor's perspective, *reading* a byte on a stream means + that the application *wrote* the byte. That's why the order of "written" + vs "read" is opposite for stream_bw events compared to bw events. - These events apply only to streams entering Tor (such as on a SOCKSPort, - TransPort, or so on). They are not generated for exiting streams. + These events are generated about once per second per stream; no events + are generated for streams that have not written or read. These events + apply only to streams entering Tor (such as on a SOCKSPort, TransPort, + or so on). They are not generated for exiting streams. 4.1.14. Per-country client stats |