aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
blob: 31ffadc87e18d9ba83f470fa7764b775c348051a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![allow(unused_imports)]
use std::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");
            }
            Err(e) => {
                println!("error: {}", e);
            }
        }
    }
}