tokio icon indicating copy to clipboard operation
tokio copied to clipboard

implement Socket.setsockopt()

Open fafhrd91 opened this issue 8 years ago • 5 comments

we need this for some options, like TCP_NODELAY, TCP_CORK, SO_KEEPALIVE

fafhrd91 avatar May 05 '17 18:05 fafhrd91

NODELAY should be set by default btw.

1st1 avatar May 05 '17 18:05 1st1

But if we start mixing it with CORK, then we need to turn it off?

@asvetlov added this cork and nodelay manipulation to aiohttp

fafhrd91 avatar May 05 '17 19:05 fafhrd91

Well, asyncio in Python 3.6 (and 3.5.3) sets NODELAY by default and so should we. It's really up to those who use advanced TCP settings to workaround that.

1st1 avatar May 05 '17 19:05 1st1

Moreover, I hope we can use (eventually) vectorized writes in tokio.Transport.write() and .writelines(), which should cover use cases for CORK.

1st1 avatar May 05 '17 19:05 1st1

btw we need to add tests for Transport, uvloop doesn't contain tests for "writelines()" for example

fafhrd91 avatar May 05 '17 19:05 fafhrd91