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.

client.rs 263B

12345678910
  1. use std::net::TcpStream;
  2. fn main() {
  3. let stream = TcpStream::connect("127.0.0.1:8080");
  4. if stream.is_ok() {
  5. println!("Connected to the server!");
  6. } else {
  7. println!("Couldn't connect to server...");
  8. }
  9. } // the stream is closed here