mirror of
https://github.com/Noratrieb/terminal-chat.git
synced 2026-01-14 16:35:10 +01:00
yes
This commit is contained in:
parent
1530e64f2b
commit
d3675c9682
3 changed files with 4 additions and 6 deletions
|
|
@ -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"
|
||||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue