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)
| 1165 | return future |
| 1166 | |
| 1167 | def detach(self) -> iostream.IOStream: |
| 1168 | """Take control of the underlying stream. |
| 1169 | |
| 1170 | Returns the underlying `.IOStream` object and stops all |
| 1171 | further HTTP processing. Intended for implementing protocols |
| 1172 | like websockets that tunnel over an HTTP handshake. |
| 1173 | |
| 1174 | This method is only supported when HTTP/1.1 is used. |
| 1175 | |
| 1176 | .. versionadded:: 5.1 |
| 1177 | """ |
| 1178 | self._finished = True |
| 1179 | # TODO: add detach to HTTPConnection? |
| 1180 | return self.request.connection.detach() # type: ignore |
| 1181 | |
| 1182 | def _break_cycles(self) -> None: |
| 1183 | # Break up a reference cycle between this handler and the |
no outgoing calls