Dever v0.0.2

This commit is contained in:
Codex committed 2026-11-27 06:03:56 +00:00
commit e6e175ebcf
816 files changed
+120349

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
use dever_runtime::{net, task, http::websocket::Message};
task::run(true, 32, async |scope| {
let listener = net::listen("127.0.0.1", 0, scope).await.unwrap();
let port = listener.port().unwrap();
let active = listener.clone();
let server = scope.spawn(move |child| async move { @start@(&child, &active).await }).unwrap();
let message = @exchange@(scope, port).await.unwrap();
assert_eq!(message, Message::Text("hello".into()));
listener.close().unwrap();
server.await.unwrap().unwrap();
Ok::<_, ()>(())
}).unwrap().unwrap();