Struct bitflags::__core::net::TcpStream
[−]
[src]
pub struct TcpStream(_);1.0.0
A structure which represents a TCP stream between a local socket and a remote socket.
The socket will be closed when the value is dropped.
Examples
use std::io::prelude::*; use std::net::TcpStream; { let mut stream = TcpStream::connect("127.0.0.1:34254").unwrap(); // ignore the Result let _ = stream.write(&[1]); let _ = stream.read(&mut [0; 128]); // ignore here too } // the stream is closed here