diff options
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 31ffadc..20ceccd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,13 +1,13 @@ #![allow(unused_imports)] -use std::net::TcpListener; +use std::{io::Write, net::TcpListener}; fn main() { let listener = TcpListener::bind("127.0.0.1:6379").unwrap(); for stream in listener.incoming() { match stream { - Ok(_stream) => { - println!("accepted new connection"); + Ok(mut stream) => { + stream.write_all(b"+PONG\r\n").unwrap(); } Err(e) => { println!("error: {}", e); |
