pub enum ServerMessage {
Show 13 variants
Error(StatusCode, String),
NewMeeting {
owner_id: UserId,
slots: HashSet<UserId>,
data: Value,
},
MeetingCreated(MeetingState),
JoinMeeting(MeetingId, UserId),
MeetingReady(MeetingState),
NewSession(SessionRequest),
SessionConnection {
session_id: SessionId,
peer_key: Vec<u8>,
},
SessionCreated(SessionState),
SessionReady(SessionState),
SessionActive(SessionState),
SessionTimeout(SessionId),
CloseSession(SessionId),
SessionFinished(SessionId),
// some variants omitted
}
Expand description
Message sent between the server and a client.
Variants§
Error(StatusCode, String)
Return an error message to the client.
NewMeeting
Request a new meeting point.
Fields
MeetingCreated(MeetingState)
Response to a new meeting point request.
JoinMeeting(MeetingId, UserId)
Participant joins a meeting.
MeetingReady(MeetingState)
Notification dispatched to all participants in a meeting when the limit for the meeting has been reached.
NewSession(SessionRequest)
Request a new session.
SessionConnection
Register a peer connection in a session.
SessionCreated(SessionState)
Response to a new session request.
SessionReady(SessionState)
Notification dispatched to all participants in a session when they have all completed the server handshake.
SessionActive(SessionState)
Notification dispatched to all participants in a session when they have all established peer connections to each other.
SessionTimeout(SessionId)
Notification dispatched to all participants in a session when the participants did not all connect within the expected timeframe.
CloseSession(SessionId)
Request to close a session.
SessionFinished(SessionId)
Message sent when a session was closed.