Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions sesame/rocket/src/rocket/rocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ impl SesameRocket<rocket::Build> {
}
}
// Finish building by launching and awaiting result.
/// Launch on a caller-supplied `Listener` instead of Rocket's
/// built-in TCP and rustls pair, for applications that bring their
/// own TLS stack. Forwards to `Rocket::launch_with_listener`.
pub async fn launch_with_listener<L>(self, listener: L) -> Result<(), rocket::Error>
where
L: rocket::http::private::Listener + Send,
<L as rocket::http::private::Listener>::Connection: Send + Unpin + 'static,
{
self.frontend.launch_with_listener(listener).await
}

pub async fn launch(self) -> Result<(), rocket::Error> {
self.frontend.launch().await
}
Expand Down