refactor(server): move non-conn code out of conn.rs

The actual code for `Server` was previously organized very confusingly:
it was thrice layered with `SpawnAll` and `Serve` which both appeared in
conn.rs despite not having anything to do with the lower-level conn API.
This commit changes that, removing all layering and having the code for
the higher-level `Server` appear inside `server.rs` only.
This commit is contained in:
SabrinaJewson
2022-03-12 12:59:58 +00:00
committed by Sean McArthur
parent 53f15e5870
commit 0fec1c8737
5 changed files with 262 additions and 369 deletions

View File

@@ -11,7 +11,7 @@ use crate::body::HttpBody;
use crate::proto::h2::server::H2Stream;
use crate::rt::Executor;
#[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))]
use crate::server::conn::spawn_all::{NewSvcTask, Watcher};
use crate::server::server::{Watcher, new_svc::NewSvcTask};
#[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))]
use crate::service::HttpService;