MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / setSocket

Method setSocket

src/shared/back/SocketClient.ts:68–76  ·  view source on GitHub ↗
(socket: SOCKET)

Source from the content-addressed store, hash-verified

66 }
67
68 setSocket(socket: SOCKET): void {
69 this.keepOpen = true;
70 this.client.socket = socket;
71 this.client.socket.onmessage = this.onMessage.bind(this);
72 this.client.socket.onerror = this.onError.bind(this);
73 this.client.socket.onclose = this.onClose.bind(this);
74 this.client.socket.onopen = this.onOpen.bind(this);
75 this.ensureConnection();
76 }
77
78 listen(socket: SOCKET): void {
79 this.unlisten();

Callers 4

reconnectMethod · 0.95
startupFunction · 0.80
startupFunction · 0.80

Calls 1

ensureConnectionMethod · 0.95

Tested by

no test coverage detected