added a name request to the standard

This commit is contained in:
Nickiel12 2024-09-01 00:44:45 +00:00
parent a89e970be3
commit c5e733b71d

View file

@ -16,8 +16,13 @@ use webrtc::ice_transport::ice_candidate::{RTCIceCandidate, RTCIceCandidateInit}
static MAX_MESSAGE: usize = 50; static MAX_MESSAGE: usize = 50;
/// Standardized messages that can be sent between the controller
/// and satellites
#[derive(Serialize, Deserialize, Clone)] #[derive(Serialize, Deserialize, Clone)]
pub enum ApplicationMessage { pub enum ApplicationMessage {
/// Ask for the satellite's name. If it is None, it is a name request
/// if it is Some, it is a response to a name request
NameRequest(Option<String>),
WebRTCPacket(RTCSessionDescription), WebRTCPacket(RTCSessionDescription),
WebRTCIceCandidate(RTCIceCandidate), WebRTCIceCandidate(RTCIceCandidate),
WebRTCIceCandidateInit(RTCIceCandidateInit), WebRTCIceCandidateInit(RTCIceCandidateInit),