Initial commit

This commit is contained in:
Matt Brubeck 2020-05-16 22:16:46 -07:00
commit 1715dfb584
8 changed files with 516 additions and 0 deletions

19
src/main.rs Normal file
View file

@ -0,0 +1,19 @@
use {
agate::{Result},
rustls::{NoClientAuth, ServerConfig, ServerSession},
std::{
net::TcpListener,
sync::Arc,
},
};
fn main() -> Result {
let tls_config = Arc::new(ServerConfig::new(NoClientAuth::new()));
// TODO: configure a certificate
let listener = TcpListener::bind("0.0.0.0:1965")?;
for stream in listener.incoming() {
let session = ServerSession::new(&tls_config);
}
Ok(())
}