This commit is contained in:
parent
6e5c985719
commit
eaae9b0d13
41 changed files with 1695 additions and 655 deletions
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue