You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to upload a file to a server, but I want to control my upload rate.
Since we are now using SSL, however, I have no idea how to control the rate under this case...
The tcp_stream have function to control the rate directly, so what should I do in order to control the rate with the ssl_stream? cuz I've searched the code about ssl_stream, that I didn't find anything about controlling the rate...
Perhaps it may be a little mess since it is not well organized.
The text was updated successfully, but these errors were encountered:
You can either intersperse each invocation of async_read_some with a delay based on how much data was read since the last read, or you can write your own rate_limited_stream type that implements the AsyncReadStream concept.
The first method is the easiest.
Are you using HTTP or Websockets? Callbacks or coroutines? If you need more guidance I can write a little demo.
@madmongo1 How'd you go about this? Drop in a delay between calls to async_read_some? I wonder if rate-limited ops could be a nice demo of async_compose
I want to upload a file to a server, but I want to control my upload rate.
Since we are now using SSL, however, I have no idea how to control the rate under this case...
The
tcp_stream
have function to control the rate directly, so what should I do in order to control the rate with thessl_stream
? cuz I've searched the code aboutssl_stream
, that I didn't find anything about controlling the rate...Perhaps it may be a little mess since it is not well organized.
The text was updated successfully, but these errors were encountered: