You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found each HTTP request incoming, make_service_fn gets called once, and server_fn also gets called once.
What's the definition of make_service_fn and service_fn? Why not just one service function instead of two nested functions?
I am very confused, please help!
The text was updated successfully, but these errors were encountered:
Said with a few more words: MakeService receives the address of the incoming connection and produces a service that will handle requests from that connection. If your request handling code only cares about the request and not the connection then MakeService might seem a bit redundant. However some use cases requires the address as well for example to set the Forwarded header on responses.
I have a PR that adds a utility to bypass make_service_fn if you don't need it #2541
I found each HTTP request incoming, make_service_fn gets called once, and server_fn also gets called once.
What's the definition of make_service_fn and service_fn? Why not just one service function instead of two nested functions?
I am very confused, please help!
The text was updated successfully, but these errors were encountered: