enum WsKind
Kind of a WebSocket message.
Example:
use std.http { WsKind }
fn name(k: WsKind) -> str {
match k {
.Text => "text"
.Binary => "binary"
.Ping => "ping"
.Pong => "pong"
.Close => "close"
}
}
fn main() io {
print(name(WsKind.Ping))
}Вывод
ping
pub(api) enum WsKindС версии. 1.0.0-beta
Варианты
Text | A text message. |
Binary | A binary message. |
Ping | A ping control frame. |
Pong | A pong control frame. |
Close | A close frame. |
Определено в: std/http/http.oxl:2073