ipv6 support :D
This commit is contained in:
parent
9d712ddd10
commit
f5ea5cb3a1
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ pub fn server(port: u16, key: &str, sleep_delay_ms: u64) {
|
||||||
let mut buf8 = [0u8; 8];
|
let mut buf8 = [0u8; 8];
|
||||||
let mut buf16 = [0u8; 16];
|
let mut buf16 = [0u8; 16];
|
||||||
let mut buf = [0; 1024];
|
let mut buf = [0; 1024];
|
||||||
let tcpl = TcpListener::bind(("0.0.0.0", port)).unwrap();
|
let tcpl = TcpListener::bind(("::1", port)).unwrap();
|
||||||
let mut tcp = loop {
|
let mut tcp = loop {
|
||||||
let Ok(mut tcp) = tcpl.accept() else { continue };
|
let Ok(mut tcp) = tcpl.accept() else { continue };
|
||||||
let Ok(()) = tcp.0.read_exact(&mut buf4) else {
|
let Ok(()) = tcp.0.read_exact(&mut buf4) else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue