feat: add c2s websocket to identity server

This commit is contained in:
sam 2024-02-27 03:52:39 +01:00
parent 809af7e637
commit 42abd70184
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
3 changed files with 271 additions and 8 deletions

View file

@ -17,9 +17,20 @@ pub enum Payload {
},
/// Hello message, sent after authentication succeeds
Hello {
heartbeat_interval: u64,
guilds: Vec<String>,
},
Identify {
token: String,
},
/// Sent on a regular interval by the client, to keep the connection alive.
Heartbeat {
#[serde(rename = "t")]
timestamp: u64,
},
/// Sent in response to a Heartbeat.
HeartbeatAck {
#[serde(rename = "t")]
timestamp: u64,
}
}