MCPcopy Index your code
hub / github.com/witheve/Eve / constructor

Method constructor

src/client.ts:142–158  ·  view source on GitHub ↗
(url?:string)

Source from the content-addressed store, hash-verified

140 worker: Worker;
141
142 constructor(url?:string) {
143 let loc = url ? url : this.getUrl();
144
145 this.socket = new WebSocket(loc);
146 this.socket.onerror = (event) => {
147 this.onError();
148 }
149 this.socket.onopen = (event) => {
150 this.onOpen();
151 }
152 this.socket.onmessage = (event) => {
153 this.onMessage(event);
154 }
155 this.socket.onclose = (event) => {
156 this.onClose();
157 }
158 }
159
160 getUrl() {
161 let protocol = "ws://";

Callers

nothing calls this directly

Calls 5

getUrlMethod · 0.95
onErrorMethod · 0.95
onOpenMethod · 0.95
onMessageMethod · 0.95
onCloseMethod · 0.95

Tested by

no test coverage detected