Add basic ping-pong websocket
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
use std::time::Duration;
|
||||
|
||||
/// Session key for OpenID login state
|
||||
pub const STATE_KEY: &str = "oidc-state";
|
||||
|
||||
@@ -6,3 +8,11 @@ pub const USER_SESSION_KEY: &str = "user";
|
||||
|
||||
/// Token length
|
||||
pub const TOKEN_LEN: usize = 20;
|
||||
|
||||
/// How often heartbeat pings are sent.
|
||||
///
|
||||
/// Should be half (or less) of the acceptable client timeout.
|
||||
pub const WS_HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5);
|
||||
|
||||
/// How long before lack of client response causes a timeout.
|
||||
pub const WS_CLIENT_TIMEOUT: Duration = Duration::from_secs(10);
|
||||
|
Reference in New Issue
Block a user