Skip to content

Commit c71f232

Browse files
committed
p2p: add auto-generated documentation
1 parent d7b9fbc commit c71f232

File tree

5 files changed

+740
-12
lines changed

5 files changed

+740
-12
lines changed

p2p/src/webrtc/connection_auth.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
//! WebRTC connection authentication.
2+
//!
3+
//! Provides cryptographic authentication for WebRTC connections using SDP hashes
4+
//! and public key encryption to prevent man-in-the-middle attacks.
5+
16
use rand::{CryptoRng, Rng};
27
use serde::{Deserialize, Serialize};
38

p2p/src/webrtc/host.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
//! Host address resolution for WebRTC connections.
2+
//!
3+
//! This module provides the [`Host`] enum for representing different types of
4+
//! network addresses used in WebRTC signaling. It supports various address
5+
//! formats including domain names, IPv4/IPv6 addresses, and multiaddr protocol
6+
//! addresses.
7+
//!
8+
//! ## Supported Address Types
9+
//!
10+
//! - **Domain Names**: DNS resolvable hostnames (e.g., `signal.example.com`)
11+
//! - **IPv4 Addresses**: Standard IPv4 addresses (e.g., `192.168.1.1`)
12+
//! - **IPv6 Addresses**: Standard IPv6 addresses (e.g., `::1`)
13+
//! - **Multiaddr**: Protocol-aware addressing format for P2P networks
14+
//!
15+
//! ## Usage
16+
//!
17+
//! The `Host` type is used throughout the WebRTC implementation to specify
18+
//! signaling server addresses and peer endpoints. It provides automatic
19+
//! parsing and resolution capabilities for different address formats.
20+
121
use std::{
222
net::{IpAddr, Ipv4Addr, Ipv6Addr, ToSocketAddrs},
323
str::FromStr,

0 commit comments

Comments
 (0)