src/bin/h2s-client.rs: increase tokio tcp stream read buffer size
This improves download speed by factor 10.
This commit is contained in:
parent
34f7131160
commit
dc9775d1b0
@ -70,6 +70,8 @@ pub fn main() -> Result<(), Error> {
|
||||
let tcp = tcp_stream
|
||||
.map_err(Error::from)
|
||||
.and_then(|c| {
|
||||
c.set_nodelay(true).unwrap();
|
||||
c.set_recv_buffer_size(1024*1024).unwrap();
|
||||
let mut builder = native_tls::TlsConnector::builder();
|
||||
builder.danger_accept_invalid_certs(true);
|
||||
let connector = builder.build().unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user