Function
_ws_on_message
(message: Union[str, bytes])
Source from the content-addressed store, hash-verified
| 152 | server = ws.connect_to_server() |
| 153 | |
| 154 | def _ws_on_message(message: Union[str, bytes]) -> None: |
| 155 | if message == "to-respond": |
| 156 | ws.send("response") |
| 157 | return |
| 158 | if message == "to-block": |
| 159 | return |
| 160 | if message == "to-modify": |
| 161 | server.send("modified") |
| 162 | return |
| 163 | server.send(message) |
| 164 | |
| 165 | ws.on_message(_ws_on_message) |
| 166 | |
Callers
nothing calls this directly
Tested by
no test coverage detected