MCPcopy
hub / github.com/audreyt/ethercalc / WebSocketLike

Interface WebSocketLike

packages/socketio-shim/src/adapter.ts:39–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37 * workerd's hibernatable WS or a Node test stub.
38 */
39export interface WebSocketLike {
40 send(data: string): void;
41 close(code?: number, reason?: string): void;
42 addEventListener?(
43 type: 'message' | 'close' | 'error',
44 listener: (ev: { data?: unknown; code?: number; reason?: string }) => void,
45 ): void;
46}
47
48export interface SocketIoShimOptions {
49 /**

Callers 8

deliverFrameFunction · 0.65
acceptFunction · 0.65
emitFunction · 0.65
closeSessionFunction · 0.65
disconnectFunction · 0.65
createSocialCalcFactoryFunction · 0.65
acceptFunction · 0.65
ioFunction · 0.65

Implementers 6

FakeWebSocketpackages/socketio-shim/test/adapter.te
MockWebSocketpackages/client/test/mock-ws.ts
FakeWebSocketpackages/socketio-shim/test/legacy-io.
PendingSocketpackages/oracle-harness/test/ws-transp
ErrorSocketpackages/oracle-harness/test/ws-transp
SlowSocketpackages/oracle-harness/test/ws-transp

Calls

no outgoing calls

Tested by

no test coverage detected