mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-15 00:00:15 +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.
|
||||
static DUMMY: &[u8] = &[0];
|
||||
let iovec = <&IoVec>::from(DUMMY);
|
||||
let mut bufs = [
|
||||
iovec, iovec, iovec, iovec,
|
||||
iovec, iovec, iovec, iovec,
|
||||
iovec, iovec, iovec, iovec,
|
||||
iovec, iovec, iovec, iovec,
|
||||
];
|
||||
let mut bufs = [iovec; 64];
|
||||
let n = buf.bytes_vec(&mut bufs);
|
||||
self.io.get_ref().write_bufs(&bufs[..n])
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user