Browse Source

Port als lokale Variable

Key-exchange
Florian Geiger 2 years ago
parent
commit
bb8f5fc0d4
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/bin/client.rs

+ 2
- 1
src/bin/client.rs View File

@@ -2,9 +2,10 @@ use std::io::Write;
use std::net::TcpStream;

fn main() {
let port: u32 = 7878;
//let stream = TcpStream::connect("172.30.16.1:8080");
//let stream = TcpStream::connect("27.0.0.1:8080");
match TcpStream::connect("localhost:7878") {
match TcpStream::connect(format!("localhost:{}", port)) {
Ok(mut stream) => {
println!("Successfully connected to server");


Loading…
Cancel
Save