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

Class SocketRuntimeClient

src/runtime/server.ts:154–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152
153
154class SocketRuntimeClient extends RuntimeClient {
155 socket: WebSocket;
156
157 constructor(socket:WebSocket, withIDE:boolean) {
158 const dbs = {
159 "http": new HttpDatabase(),
160 "shared": shared,
161 }
162 if(withIDE) {
163 dbs["view"] = new BrowserViewDatabase();
164 dbs["editor"] = new BrowserEditorDatabase();
165 dbs["inspector"] = new BrowserInspectorDatabase();
166 }
167 super(dbs);
168 this.socket = socket;
169 }
170
171 send(json) {
172 if(this.socket && this.socket.readyState === 1) {
173 this.socket.send(json);
174 }
175 }
176}
177
178function IDEMessageHandler(client:SocketRuntimeClient, message) {
179 let ws = client.socket;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected