mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
Use 64 iovecs in TcpStream::write_buf (#295)
This commit is contained in:
committed by
Carl Lerche
parent
fbdf04f604
commit
e140dabed2
+1
-6
@@ -694,12 +694,7 @@ impl<'a> AsyncWrite for &'a TcpStream {
|
|||||||
// `bytes_vec` method.
|
// `bytes_vec` method.
|
||||||
static DUMMY: &[u8] = &[0];
|
static DUMMY: &[u8] = &[0];
|
||||||
let iovec = <&IoVec>::from(DUMMY);
|
let iovec = <&IoVec>::from(DUMMY);
|
||||||
let mut bufs = [
|
let mut bufs = [iovec; 64];
|
||||||
iovec, iovec, iovec, iovec,
|
|
||||||
iovec, iovec, iovec, iovec,
|
|
||||||
iovec, iovec, iovec, iovec,
|
|
||||||
iovec, iovec, iovec, iovec,
|
|
||||||
];
|
|
||||||
let n = buf.bytes_vec(&mut bufs);
|
let n = buf.bytes_vec(&mut bufs);
|
||||||
self.io.get_ref().write_bufs(&bufs[..n])
|
self.io.get_ref().write_bufs(&bufs[..n])
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user