mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
aquatic_ws_protocol: add comment OutMessage::from_ws_message
This commit is contained in:
parent
4bffecc345
commit
1d2dfe3fe1
1 changed files with 2 additions and 0 deletions
|
|
@ -304,6 +304,8 @@ impl OutMessage {
|
|||
_ => return Err(anyhow::anyhow!("Message is neither text nor bytes")),
|
||||
};
|
||||
|
||||
// This is brittle and could fail, but it doesn't matter too much
|
||||
// since this function is only used in load tester
|
||||
if text.contains("answer"){
|
||||
Ok(Self::Answer(::serde_json::from_str(&text)?))
|
||||
} else if text.contains("offer"){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue