MCPcopy Create free account
hub / github.com/EasyIME/PIME / set_nodelay

Method set_nodelay

python/python3/tornado/iostream.py:1324–1338  ·  view source on GitHub ↗
(self, value: bool)

Source from the content-addressed store, hash-verified

1322 self._connecting = False
1323
1324 def set_nodelay(self, value: bool) -> None:
1325 if self.socket is not None and self.socket.family in (
1326 socket.AF_INET,
1327 socket.AF_INET6,
1328 ):
1329 try:
1330 self.socket.setsockopt(
1331 socket.IPPROTO_TCP, socket.TCP_NODELAY, 1 if value else 0
1332 )
1333 except socket.error as e:
1334 # Sometimes setsockopt will fail if the socket is closed
1335 # at the wrong time. This can happen with HTTPServer
1336 # resetting the value to ``False`` between requests.
1337 if e.errno != errno.EINVAL and not self._is_connreset(e):
1338 raise
1339
1340
1341class SSLIOStream(IOStream):

Callers 4

_create_connectionMethod · 0.45
finishMethod · 0.45
_finish_requestMethod · 0.45
openMethod · 0.45

Calls 1

_is_connresetMethod · 0.45

Tested by 1

openMethod · 0.36