Function wire::tcp::upgrade_tcp
[−]
[src]
pub fn upgrade_tcp<'a, 'b, I, O>(
stream: TcpStream,
read_limit: SizeLimit,
write_limit: SizeLimit
) -> IoResult<(InTcpStream<I>, OutTcpStream<O>)> where
I: Send + Decodable + 'static,
O: Encodable,
Upgrades a TcpStream to a Sender-Receiver pair that you can use to send and receive objects automatically. If there is an error decoding or encoding values, that respective part is shut down.