add basic client connectivity
This commit is contained in:
parent
1202463d4d
commit
9a1997ad55
3
.gitignore
vendored
3
.gitignore
vendored
@ -15,3 +15,6 @@ Cargo.lock
|
|||||||
# Added by cargo
|
# Added by cargo
|
||||||
|
|
||||||
/target
|
/target
|
||||||
|
|
||||||
|
# Needed to ignore IntelliJ stettings
|
||||||
|
/.idea
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
use std::net::TcpStream;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println! ("client");
|
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
|
Loading…
x
Reference in New Issue
Block a user