MCPcopy
hub / github.com/aio-libs/aiohttp / WSMessage

Class WSMessage

aiohttp/_websocket/models.py:51–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50
51class WSMessage(NamedTuple):
52 type: WSMsgType
53 # To type correctly, this would need some kind of tagged union for each type.
54 data: Any
55 extra: str | None
56
57 def json(self, *, loads: Callable[[Any], Any] = json.loads) -> Any:
58 """Return parsed JSON data.
59
60 .. versionadded:: 0.22
61 """
62 return loads(self.data)
63
64
65class WSMessageTextBytes(NamedTuple):

Callers 15

receiveFunction · 0.90
test_receive_closingFunction · 0.90
test_close_after_closingFunction · 0.90
test_close_frame_infoFunction · 0.90
test_continuationFunction · 0.90
test_flow_control_binaryFunction · 0.90

Calls

no outgoing calls

Tested by 14

receiveFunction · 0.72
test_receive_closingFunction · 0.72
test_close_after_closingFunction · 0.72
test_close_frame_infoFunction · 0.72
test_continuationFunction · 0.72
test_flow_control_binaryFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…