amber/upgrade_web_socket_option
Types
pub type UpgradeWebSocketOption {
Protocol(String)
IdleTimeout(Int)
}
Constructors
-
Protocol(String)Sets the
.protocolproperty on the client side web socket to the value provided here, which should be one of the strings specified in theprotocolsparameter when requesting the web socket. This is intended for clients and servers to specify sub-protocols to use to communicate to each other. -
IdleTimeout(Int)If the client does not respond to this frame with a
pongwithin the timeout specified, the connection is deemed unhealthy and is closed. Thecloseanderrorevent will be emitted.The unit is seconds, with a default of 30. Set to
0to disable timeouts.