MCPcopy Create free account
hub / github.com/pywebio/PyWebIO / SessionCtrlHandler

Class SessionCtrlHandler

webiojs/src/handlers/base.ts:10–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8}
9
10export class SessionCtrlHandler implements CommandHandler {
11 accept_command: string[] = ['close_session', 'set_session_id'];
12
13 constructor(readonly session: Session) {
14 }
15
16 handle_message(msg: Command) {
17 if (msg.command == 'close_session')
18 this.session.close_session();
19 else if (msg.command == 'set_session_id')
20 this.session.webio_session_id = msg.spec;
21 }
22}
23
24export class CommandDispatcher {
25 command2handler: { [cmd: string]: CommandHandler } = {};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…