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

Long polling -- force buffer flush? #120

Closed
ckcollab opened this issue Dec 21, 2015 · 2 comments
Closed

Long polling -- force buffer flush? #120

ckcollab opened this issue Dec 21, 2015 · 2 comments

Comments

@ckcollab
Copy link

Hey there, first of all: thanks for waitress!

I have been going through the docs trying to solve a problem when doing long polling: my buffers don't seem to flush until I respond with > 50kb of data. I found the send_bytes option but I don't want every response to not buffer. Is there a "right way" to prune (like this PR #113 ) after I yield something to a streaming response? I also found this issue #49 discussing the issue, but again I don't think send_bytes is what I want?

Or is send_bytes=1 not that big a deal?

@digitalresistor
Copy link
Member

It sounds like you would want to use send_bytes=1.

@digitalresistor
Copy link
Member

Notes for later:

https://github.com/Pylons/waitress/blob/master/waitress/channel.py#L255

Leads to terrible performance as we have to loop much more than necessary. Let's use getsockopt for SO_SNDBUF to figure out how much data we can stuff into send in one go without it blocking.

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

2 participants