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

Method detach

python/python3/tornado/http1connection.py:350–363  ·  view source on GitHub ↗

Take control of the underlying stream. Returns the underlying `.IOStream` object and stops all further HTTP processing. May only be called during `.HTTPMessageDelegate.headers_received`. Intended for implementing protocols like websockets that tunnel over an HTTP h

(self)

Source from the content-addressed store, hash-verified

348 future_set_result_unless_cancelled(self._finish_future, None)
349
350 def detach(self) -> iostream.IOStream:
351 """Take control of the underlying stream.
352
353 Returns the underlying `.IOStream` object and stops all further
354 HTTP processing. May only be called during
355 `.HTTPMessageDelegate.headers_received`. Intended for implementing
356 protocols like websockets that tunnel over an HTTP handshake.
357 """
358 self._clear_callbacks()
359 stream = self.stream
360 self.stream = None # type: ignore
361 if not self._finish_future.done():
362 future_set_result_unless_cancelled(self._finish_future, None)
363 return stream
364
365 def set_body_timeout(self, timeout: float) -> None:
366 """Sets the body timeout for a single request.

Callers

nothing calls this directly

Calls 3

_clear_callbacksMethod · 0.95
doneMethod · 0.45

Tested by

no test coverage detected