MCPcopy
hub / github.com/tornadoweb/tornado / detach

Method detach

tornado/web.py:1327–1340  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 6

_detach_streamMethod · 0.45
headers_receivedMethod · 0.45
finishMethod · 0.45
getMethod · 0.45
getMethod · 0.45
respond_204Method · 0.45

Calls

no outgoing calls

Tested by 4

finishMethod · 0.36
getMethod · 0.36
getMethod · 0.36
respond_204Method · 0.36