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

Method _detach_stream

tornado/websocket.py:622–634  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

620 return None
621
622 def _detach_stream(self) -> IOStream:
623 # disable non-WS methods
624 for method in [
625 "write",
626 "redirect",
627 "set_header",
628 "set_cookie",
629 "set_status",
630 "flush",
631 "finish",
632 ]:
633 setattr(self, method, _raise_not_supported_for_websockets)
634 return self.detach()
635
636
637def _raise_not_supported_for_websockets(*args: Any, **kwargs: Any) -> None:

Callers 1

_accept_connectionMethod · 0.80

Calls 1

detachMethod · 0.45

Tested by

no test coverage detected