split

Function split 

Source
pub fn split<T>(stream: T) -> (ReadHalf<T>, WriteHalf<T>)
where T: AsyncRead + AsyncWrite,
Available on crate feature io only.
Expand description

Splits a single value implementing AsyncRead + AsyncWrite into separate AsyncRead and AsyncWrite handles with or without internal synchronization dependes on whether sync feature is turned on.