mirror of
https://github.com/htrefil/rkvm.git
synced 2025-01-30 20:34:13 +01:00
Buffer client reads
This commit is contained in:
parent
60439f061c
commit
ffd82bfec5
1 changed files with 2 additions and 0 deletions
|
@ -9,6 +9,7 @@ use std::path::{Path, PathBuf};
|
||||||
use std::process;
|
use std::process;
|
||||||
use structopt::StructOpt;
|
use structopt::StructOpt;
|
||||||
use tokio::fs;
|
use tokio::fs;
|
||||||
|
use tokio::io::BufReader;
|
||||||
use tokio::net::TcpStream;
|
use tokio::net::TcpStream;
|
||||||
use tokio_native_tls::native_tls::{Certificate, TlsConnector};
|
use tokio_native_tls::native_tls::{Certificate, TlsConnector};
|
||||||
|
|
||||||
|
@ -27,6 +28,7 @@ async fn run(server: &str, port: u16, certificate_path: &Path) -> Result<Infalli
|
||||||
.into();
|
.into();
|
||||||
|
|
||||||
let stream = TcpStream::connect((server, port)).await?;
|
let stream = TcpStream::connect((server, port)).await?;
|
||||||
|
let stream = BufReader::new(stream);
|
||||||
let mut stream = connector
|
let mut stream = connector
|
||||||
.connect(server, stream)
|
.connect(server, stream)
|
||||||
.await
|
.await
|
||||||
|
|
Loading…
Add table
Reference in a new issue