mirror of
https://github.com/Noratrieb/terminal-chat.git
synced 2026-01-17 01:45:10 +01:00
yes
This commit is contained in:
parent
1530e64f2b
commit
d3675c9682
3 changed files with 4 additions and 6 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
use std::net::{TcpStream, TcpListener, IpAddr, Ipv4Addr};
|
use std::net::{TcpStream, TcpListener};
|
||||||
use std::io::{self, Read};
|
use std::io::{self, Read};
|
||||||
use std::sync::{Mutex, Arc};
|
|
||||||
use crate::IpAddress::{Normal, WithPort};
|
use crate::IpAddress::{Normal, WithPort};
|
||||||
|
|
||||||
pub enum IpAddress {
|
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 terminal_chat::{connect, listen, read_stream_print, IpAddress};
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::sync::{Arc, Mutex};
|
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
@ -16,7 +15,7 @@ fn main() {
|
||||||
Version 0.1");
|
Version 0.1");
|
||||||
|
|
||||||
println!("Do you want to listen(l) or connect(c) to a listener?");
|
println!("Do you want to listen(l) or connect(c) to a listener?");
|
||||||
let mut did_listen;
|
let did_listen;
|
||||||
let stream =
|
let stream =
|
||||||
if input().contains("l") {
|
if input().contains("l") {
|
||||||
did_listen = true;
|
did_listen = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue