-
Notifications
You must be signed in to change notification settings - Fork 381
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
ask for help:: How to send the main body content multiple times? #535
Comments
session->yield(OK, "8\r\nrestbed \r\n", {{"Transfer-Encoding", "chunked"}}, [](const shared_ptr<Session> session)
{ session->yield("10\r\nchunked encoding\r\n", [](const shared_ptr<Session> session)
{ session->close("0\r\n\r\n"); }); }); Maybe the size of a file is relatively large. Is it possible that a large number of callbacks may cause the stack to be too large? The correct way should be how to use it! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example, if I want to send a file to the client, each time I call the read function, I will read 1024 bytes from the file. How to send it only once without using Bytes, but send it every read. Looking forward to your help.
The text was updated successfully, but these errors were encountered: