You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12345678910 |
- use std::net::TcpStream;
-
- fn main() {
- let stream = TcpStream::connect("127.0.0.1:8080");
- if stream.is_ok() {
- println!("Connected to the server!");
- } else {
- println!("Couldn't connect to server...");
- }
- } // the stream is closed here
|