This commit is contained in:
nora 2021-03-29 10:57:36 +02:00
parent 1530e64f2b
commit d3675c9682
3 changed files with 4 additions and 6 deletions

View file

@ -7,4 +7,4 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
local_ipaddress = "0.1.3"
local_ipaddress = "0.1.3"

View file

@ -1,6 +1,5 @@
use std::net::{TcpStream, TcpListener, IpAddr, Ipv4Addr};
use std::net::{TcpStream, TcpListener};
use std::io::{self, Read};
use std::sync::{Mutex, Arc};
use crate::IpAddress::{Normal, WithPort};
pub enum IpAddress {

View file

@ -1,7 +1,6 @@
use std::io::{self, Write, Read};
use std::io::{self, Write};
use terminal_chat::{connect, listen, read_stream_print, IpAddress};
use std::thread;
use std::sync::{Arc, Mutex};
fn main() {
@ -16,7 +15,7 @@ fn main() {
Version 0.1");
println!("Do you want to listen(l) or connect(c) to a listener?");
let mut did_listen;
let did_listen;
let stream =
if input().contains("l") {
did_listen = true;