-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Nodelay #680
Conversation
def tcp_nodelay(self): | ||
return self._tcp_nodelay | ||
|
||
def set_tcp_nodelay(self, value): |
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.
Just curious, why not setter fortcp_nodelay
property?
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.
I thought about property's setter but found that syscall worth explicit function call.
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.
Ok, makes sense.
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.
if value not in (1,0):
raise ValueError('.....')
I'm finished. Flow can be controlled by I'll merge PR tomorrow. The only thing left is documentation. |
Is stream uncorked after writing last byte of response while in keep-alive mode ? |
Also, same technique should be applied to http client when it writes http request. |
I remember interesting technique in streaming over http and using chunked data. This cover not only EvenrSource http://www.w3schools.com/html/html5_serversentevents.asp but also videostreaming. I mean that in these cases each chunk of chunked response contains complete data that should be delivered to browserwith minimal delay. Even when delay between chunks are long. So, in current implemntation, user should uncork manually after sending chunk and cork again before sending chunk. Does not it ? If yes, please document that example. Also for websockets. Library should cork before sending frame and uncork afer sending. Is it so ? Sorry, but code slightly complicated for me. |
Second approach to solve nodelay issue