data WsConfig
Settings of WebSocket.connect.
Example:
use std.http { WsConfig }
fn main() io {
let cfg = WsConfig{ timeout: 5s, maxMessage: 65536, protocols: "v2, v1", compress: true }
print("{cfg.protocols}")
}Вывод
v2, v1
pub(api) data WsConfigС версии. 1.0.0-beta
Поля
pub(api) timeout: Duration? = none | Bound for connecting and the opening handshake; |
pub(api) maxMessage: i64 = 16777216 | Largest accepted message in bytes. |
pub(api) protocols: str = "" | Offered subprotocols (comma separated). |
pub(api) compress: bool = false | Offer permessage-deflate (RFC 7692); |
pub(api) ca: str = "" | wss: file with the certificate authorities to trust. |
pub(api) caPem: str = "" | wss: trust anchors as PEM text. |
pub(api) insecureSkipVerify: bool = false | wss: skip certificate verification (tests only). |
pub(api) verifyHostname: bool = true | wss: check that the certificate names the host. |
Определено в: std/http/http.oxl:2188