Signature: websocketServerListen(serverID: Int) -> Result<Success, String>

Description: Starts the WebSocket server listening for connections. (Implementation note: currently returns an integer status code; the Result-typed API shown in the signature is planned.)

Parameters

Returns: Result<Success, String>

Example

let listenResult = websocketServerListen(serverID: serverId)
match listenResult {
    Success _ => print("Server listening on ws://127.0.0.1:8080/chat")
    Err message => print("Failed to start listening: ${message}")
}