Realm IO
Realm's high performance IO collections.
Example
use TcpStream;
use ;
use ;
let mut left = connect.await.unwrap;
let mut right = connect.await.unwrap;
// direct copy
bidi_copy.await;
// zero copy
bidi_zero_copy.await;
// use custom buffer(vector)
let buf1 = new;
let buf2 = new;
bidi_copy_buf.await;
// use custom buffer(pipe)
let buf1 = new;
let buf2 = new;
bidi_copy_buf.await;
About Brutal Shutdown
By default, bidi_copy_buf and other IO functions perform a graceful shutdown.
With the feature brutal-shutdown enabled, these IO functions will decide to
perform a brutal shutdown once a FIN packet reaches, which will forcefully
close two connections on both sides without waiting for a reply packet.
This is helpful when handling connections from a poorly implemented client or server, which may never shutdown its write side nor close the underlying socket.