(self, value)
| 241 | return self._tcp_nodelay |
| 242 | |
| 243 | def set_tcp_nodelay(self, value): |
| 244 | value = bool(value) |
| 245 | if self._tcp_nodelay == value: |
| 246 | return |
| 247 | self._tcp_nodelay = value |
| 248 | if self._socket is None: |
| 249 | return |
| 250 | if self._socket.family not in (socket.AF_INET, socket.AF_INET6): |
| 251 | return |
| 252 | if self._tcp_cork: |
| 253 | self._tcp_cork = False |
| 254 | if CORK is not None: # pragma: no branch |
| 255 | self._socket.setsockopt(socket.IPPROTO_TCP, CORK, False) |
| 256 | self._socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, value) |
| 257 | |
| 258 | @property |
| 259 | def tcp_cork(self): |
no outgoing calls