Brought Example up to spec
Some checks failed
CI / checks (push) Failing after 2m25s

This commit is contained in:
Alex Emmet 2026-07-19 00:29:24 +02:00
commit eaae9b0d13
41 changed files with 1695 additions and 655 deletions

View file

@ -4,6 +4,10 @@
WebTransport sessions are returned by `accept()` for application messages.
`MTPWebServer` and `MTPHost` cannot bind the same IP and port.
The repository's combined server example registers `/` on `MTPWebServer` and
returns `OK` while the process is running. The route is served over HTTP/3 at
`https://localhost:8080/` on the same QUIC endpoint as WebTransport MTP sessions.
## WebServerConfig
| Builder | Default | Purpose |
@ -73,7 +77,7 @@ let mut server = MTPWebServer::new(host, web).await?;
while let Some(connection) = server.accept().await? {
// connection: WebMTPConnection
while let Ok(message) = connection.receiver.receive().await {
while let Ok(message) = connection.receive().await {
println!("received MTP message {}", message.get_id());
}
}