-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server: add serve
and serve_with_graceful_shutdown
helpers
#1382
Conversation
@@ -79,6 +83,60 @@ where | |||
} | |||
} | |||
|
|||
/// Serve a service over a TCP connection. | |||
pub async fn serve<S, B, I>(io: I, service: S) -> Result<(), BoxError> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I would mention here that graceful shutdowns are not handled, and users should look at serve_with_graceful_shutdown
in those cases or similar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice to see some examples get simpler and less overall code!
No description provided.