feat(WebSocket): add open event (#6315)

This commit is contained in:
nerix
2025-07-05 14:36:22 +02:00
committed by GitHub
parent 7a0de27253
commit 91c2c1021c
9 changed files with 79 additions and 6 deletions
+2
View File
@@ -133,6 +133,7 @@ declare namespace c2 {
close(): void;
send_text(data: string): void;
send_binary(data: string): void;
on_open: null | (() => void);
on_close: null | (() => void);
on_text: null | ((data: string) => void);
on_binary: null | ((data: string) => void);
@@ -143,6 +144,7 @@ declare namespace c2 {
url: string,
options?: {
headers?: Record<string, string>;
on_open?: () => void;
on_close?: () => void;
on_text?: (data: string) => void;
on_binary?: (data: string) => void;