forked from KokaKiwi/boitalettres
Simple example
This commit is contained in:
parent
25d0d3c79c
commit
0c5cea017b
1 changed files with 6 additions and 1 deletions
|
@ -10,6 +10,11 @@ async fn handle_req(req: Request) -> Result<Response> {
|
||||||
|
|
||||||
tracing::debug!("Got request: {:#?}", req);
|
tracing::debug!("Got request: {:#?}", req);
|
||||||
|
|
||||||
|
use tokio::time::{sleep, Duration};
|
||||||
|
println!("WILL SLEEP");
|
||||||
|
sleep(Duration::from_millis(100)).await;
|
||||||
|
println!("DONE SLEEP");
|
||||||
|
|
||||||
let capabilities = vec![Capability::Imap4Rev1, Capability::Idle];
|
let capabilities = vec![Capability::Imap4Rev1, Capability::Idle];
|
||||||
let body = vec![Data::Capability(capabilities)];
|
let body = vec![Data::Capability(capabilities)];
|
||||||
|
|
||||||
|
@ -17,7 +22,7 @@ async fn handle_req(req: Request) -> Result<Response> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> eyre::Result<()> {
|
async fn main() -> Result<()> {
|
||||||
tracing_subscriber::fmt::init();
|
tracing_subscriber::fmt::init();
|
||||||
|
|
||||||
let incoming = AddrIncoming::new("127.0.0.1:4567")
|
let incoming = AddrIncoming::new("127.0.0.1:4567")
|
||||||
|
|
Loading…
Reference in a new issue