MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / make_session_info

Method make_session_info

pywebio/platform/fastapi.py:37–43  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

35 return self.ws.query_params.get(name, None)
36
37 def make_session_info(self) -> dict:
38 session_info = get_session_info_from_headers(self.ws.headers)
39 session_info['user_ip'] = self.ws.client.host or ''
40 session_info['request'] = self.ws
41 session_info['backend'] = 'starlette'
42 session_info['protocol'] = 'websocket'
43 return session_info
44
45 def write_message(self, message: dict):
46 self.ioloop.create_task(self.ws.send_json(message))

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected