We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36012ed commit 19a8a6cCopy full SHA for 19a8a6c
transports/webrtc/src/tokio/upgrade.rs
@@ -154,12 +154,16 @@ async fn new_inbound_connection(
154
Ok(connection)
155
}
156
157
+/// Generates a random ufrag and adds a prefix according to the spec.
158
fn random_ufrag() -> String {
- thread_rng()
159
- .sample_iter(&Alphanumeric)
160
- .take(64)
161
- .map(char::from)
162
- .collect()
+ format!(
+ "libp2p+webrtc+v1/{}",
+ thread_rng()
+ .sample_iter(&Alphanumeric)
163
+ .take(64)
164
+ .map(char::from)
165
+ .collect::<String>()
166
+ )
167
168
169
fn setting_engine(
0 commit comments