Skip to content
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

HTTP server: start() api to expose incoming request and outgoing response #21

Open
Aniketh01 opened this issue Jun 22, 2020 · 0 comments

Comments

@Aniketh01
Copy link
Member

Current the incoming request to the server and the response spit by the server is written to the output buffer within the start function which looks a bit ugly at the moment and also I don't believe the function would be extendable.

So an ideal API design would be to have:

request, response = server.start().

Thus the returned request and response could be used to print out to the output buffer or any additional tasks could be performed.

Note, we need to return the request and response without interfering with the socket listening for any other clients that try to connect with the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant