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

Method set_ws_api

webiojs/src/session.ts:69–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 }
68
69 set_ws_api() {
70 let url = new URL(this.ws_api);
71 if (url.protocol !== 'wss:' && url.protocol !== 'ws:') {
72 let protocol = url.protocol || window.location.protocol;
73 url.protocol = protocol.replace('https', 'wss').replace('http', 'ws');
74 }
75 url.search = `?app=${this.app_name}&session=${this.webio_session_id}`;
76 this.ws_api = url.href;
77 }
78
79 on_session_create(callback: () => any): void {
80 this._session_create_callbacks.push(callback);

Callers 1

start_sessionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected