mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00

The WebSocket service isolates communication with a WebSocket to its own isolated process. Similar to other isolating services, it has its own user and group.
13 lines
511 B
Text
13 lines
511 B
Text
endpoint WebSocketServer
|
|
{
|
|
// Basic protocol
|
|
Greet() => ()
|
|
|
|
// Connection API
|
|
Connect(URL url, String origin, Vector<String> protocols, Vector<String> extensions, IPC::Dictionary additional_request_headers) => (i32 connection_id)
|
|
ReadyState(i32 connection_id) => (u32 ready_state)
|
|
Send(i32 connection_id, bool is_text, ByteBuffer data) =|
|
|
Close(i32 connection_id, u16 code, String reason) =|
|
|
|
|
SetCertificate(i32 connection_id, String certificate, String key) => (bool success)
|
|
}
|