mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 02:05:30 +00:00
improve ws protocol struct naming and documentation
This commit is contained in:
parent
b473bb6fba
commit
0789f7ec3b
17 changed files with 193 additions and 137 deletions
|
|
@ -30,10 +30,21 @@ pub struct OfferId(
|
|||
pub [u8; 20],
|
||||
);
|
||||
|
||||
/// Some kind of nested structure from https://www.npmjs.com/package/simple-peer
|
||||
/// Nested structure with SDP offer from https://www.npmjs.com/package/simple-peer
|
||||
///
|
||||
/// Created using https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createOffer
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(transparent)]
|
||||
pub struct JsonValue(pub ::serde_json::Value);
|
||||
pub struct RtcOffer {
|
||||
pub sdp: ::serde_json::Value,
|
||||
}
|
||||
|
||||
/// Nested structure with SDP answer from https://www.npmjs.com/package/simple-peer
|
||||
///
|
||||
/// Created using https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createAnswer
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct RtcAnswer {
|
||||
pub sdp: ::serde_json::Value,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct AnnounceAction;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue