Take control of the underlying stream. Returns the underlying `.IOStream` object and stops all further HTTP processing. Intended for implementing protocols like websockets that tunnel over an HTTP handshake. This method is only supported when HTTP/1.1 is used.
(self)
| 1325 | return future |
| 1326 | |
| 1327 | def detach(self) -> iostream.IOStream: |
| 1328 | """Take control of the underlying stream. |
| 1329 | |
| 1330 | Returns the underlying `.IOStream` object and stops all |
| 1331 | further HTTP processing. Intended for implementing protocols |
| 1332 | like websockets that tunnel over an HTTP handshake. |
| 1333 | |
| 1334 | This method is only supported when HTTP/1.1 is used. |
| 1335 | |
| 1336 | .. versionadded:: 5.1 |
| 1337 | """ |
| 1338 | self._finished = True |
| 1339 | # TODO: add detach to HTTPConnection? |
| 1340 | return self.request.connection.detach() # type: ignore |
| 1341 | |
| 1342 | def _break_cycles(self) -> None: |
| 1343 | # Break up a reference cycle between this handler and the |
no outgoing calls