mirror of
https://github.com/YGGverse/agate.git
synced 2026-04-08 20:45:29 +00:00
Use async-std
This commit is contained in:
parent
2954a96c89
commit
f89d2179a9
3 changed files with 439 additions and 20 deletions
16
src/main.rs
16
src/main.rs
|
|
@ -1,19 +1,5 @@
|
|||
use {
|
||||
agate::{Result},
|
||||
rustls::{NoClientAuth, ServerConfig, ServerSession},
|
||||
std::{
|
||||
net::TcpListener,
|
||||
sync::Arc,
|
||||
},
|
||||
};
|
||||
use agate::Result;
|
||||
|
||||
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(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue