[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Is it me or a bug?

On Thu, Oct 01, 2009 at 11:41:01PM +0000, Neonomad wrote:
> Hi,
>   I am running Tor version and apparently the STREAM_BW event is 
> emitting the read/written bytes the wrong way: In the control-specs it says 
> the syntax is:
>      "650" SP "STREAM_BW" SP StreamID SP BytesRead SP BytesWritten CRLF
>   This is the same order in which the general bw bytes are emitted and I 
> understand "read" to be the bytes that I downloaded from the network, and 
> "written" the ones I uploaded, but it seems that in the output, the "written" 
> bytes come first.
>  Am I misunderstanding something or is this a mistake on Tor's side?


You're right, that was a mistake. I just corrected the spec to explain:

     "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.

  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.


To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxxx with
unsubscribe or-talk    in the body. http://archives.seul.org/or/talk/