"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RuntimeWsClient = void 0;
class RuntimeWsClient {
    socket;
    connect(url, onEvent) {
        this.socket = new WebSocket(url);
        this.socket.onmessage = (message) => {
            const data = JSON.parse(message.data);
            onEvent(data);
        };
    }
    close() {
        this.socket?.close();
    }
}
exports.RuntimeWsClient = RuntimeWsClient;
//# sourceMappingURL=ws-client.js.map