MCPcopy
hub / github.com/witheve/Eve / onOpen

Method onOpen

src/client.ts:231–241  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

229 }
230
231 onOpen() {
232 this.socketSend(JSON.stringify({type: "init", url: location.pathname, hash: location.hash.substring(1)}))
233 for(let queued of this.socketQueue) {
234 this.socketSend(queued);
235 }
236 // ping the server so that the connection isn't overzealously
237 // closed
238 setInterval(() => {
239 this.socketSend(JSON.stringify({type: "ping"}));
240 }, 30000);
241 }
242
243 onClose() {
244 if(!this.localControl) {

Callers 1

constructorMethod · 0.95

Calls 1

socketSendMethod · 0.95

Tested by

no test coverage detected