MCPcopy Index your code
hub / github.com/python-websockets/websockets / getWebSocketServer

Function getWebSocketServer

example/tutorial/step3/main.js:3–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { createBoard, playMove } from "./connect4.js";
2
3function getWebSocketServer() {
4 if (window.location.host === "python-websockets.github.io") {
5 return "wss://websockets-tutorial.koyeb.app/";
6 } else if (window.location.host === "localhost:8000") {
7 return "ws://localhost:8001/";
8 } else {
9 throw new Error(`Unsupported host: ${window.location.host}`);
10 }
11}
12
13function initGame(websocket) {
14 websocket.addEventListener("open", () => {

Callers 1

main.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…