Created
July 10, 2014 21:15
-
-
Save wycats/bb9ad79532265974efbb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::{Listener,Acceptor}; | |
use std::io::net::unix::UnixListener; | |
pub fn main() { | |
let listener = UnixListener::bind(&Path::new("repro.sock")).unwrap(); | |
let mut acceptor = listener.listen().unwrap(); | |
acceptor.set_timeout(Some(1_000)); | |
for _ in acceptor.incoming() { | |
println!("GOT CONN"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment