← Back

Module webrtc

enum CandidateType

Source: webrtc.joule:19

enum TransportProtocol

Source: webrtc.joule:32

struct IceCandidate

Source: webrtc.joule:39

fn host(address: IpAddr, port: u16, component: u32) -> Self

Create host candidate

Source: webrtc.joule:66

fn to_sdp(&self) -> String

Convert to SDP attribute format

Source: webrtc.joule:86

fn from_sdp(sdp: &str) -> Option<Self>

Parse from SDP attribute

Source: webrtc.joule:114

enum TcpCandidateType

Source: webrtc.joule:179

fn compute_foundation(ctype: CandidateType, address: &IpAddr, protocol: TransportProtocol) -> String

Source: webrtc.joule:185

fn compute_priority(ctype: CandidateType, component: u32, local_pref: u32) -> u32

Source: webrtc.joule:192

enum IceRole

Source: webrtc.joule:212

enum GatheringState

Source: webrtc.joule:219

enum IceConnectionState

Source: webrtc.joule:227

struct IceConfig

Source: webrtc.joule:239

fn default() -> Self

Source: webrtc.joule:253

struct TurnServer

Source: webrtc.joule:266

enum CandidatePolicy

Source: webrtc.joule:274

enum TransportPolicy

Source: webrtc.joule:281

struct IceAgent

ICE agent for connection establishment

Source: webrtc.joule:287

fn new(config: IceConfig) -> Self

Create new ICE agent

Source: webrtc.joule:305

fn local_credentials(&self) -> (&str, &str)

Get local credentials

Source: webrtc.joule:327

fn set_remote_credentials(&mut self, ufrag: &str, pwd: &str)

Set remote credentials

Source: webrtc.joule:332

fn gather_candidates(&mut self) -> Result<(), IceError>

Source: webrtc.joule:339

fn gather_stun_candidate(

Source: webrtc.joule:370

fn gather_turn_candidate(

Source: webrtc.joule:404

fn add_remote_candidate(&mut self, candidate: IceCandidate)

Add remote candidate

Source: webrtc.joule:416

fn local_candidates(&self) -> &[IceCandidate]

Get local candidates

Source: webrtc.joule:432

fn start_connectivity_checks(&mut self) -> Result<(), IceError>

Source: webrtc.joule:438

fn connection_state(&self) -> IceConnectionState

Get connection state

Source: webrtc.joule:500

fn selected_pair(&self) -> Option<&CandidatePair>

Get selected candidate pair

Source: webrtc.joule:505

struct CandidatePair

Source: webrtc.joule:512

fn new(local: IceCandidate, remote: IceCandidate) -> Self

Source: webrtc.joule:521

enum PairState

Source: webrtc.joule:539

const STUN_MAGIC_COOKIE: u32

Source: webrtc.joule:551

const STUN_BINDING_REQUEST: u16

Source: webrtc.joule:552

const STUN_BINDING_RESPONSE: u16

Source: webrtc.joule:553

fn build_stun_request() -> Vec<u8>

Source: webrtc.joule:555

fn build_stun_binding_request(

Source: webrtc.joule:575

fn parse_stun_response(data: &[u8]) -> Result<(IpAddr, u16), IceError>

Source: webrtc.joule:648

fn is_stun_success(data: &[u8]) -> bool

Source: webrtc.joule:709

fn compute_fingerprint(data: &[u8]) -> u32

Source: webrtc.joule:717

fn crc32(data: &[u8]) -> u32

Source: webrtc.joule:723

fn parse_stun_url(url: &str) -> Result<SocketAddr, IceError>

Source: webrtc.joule:779

fn generate_ice_string(len: usize) -> String

Source: webrtc.joule:790

const CHARS: &[u8]

Source: webrtc.joule:791

struct DataChannelConfig

Source: webrtc.joule:803

fn default() -> Self

Source: webrtc.joule:821

enum DataChannelState

Source: webrtc.joule:836

struct DataChannel

Data channel for peer-to-peer data transfer

Source: webrtc.joule:844

fn new(id: u16, config: DataChannelConfig) -> Self

Source: webrtc.joule:858

fn id(&self) -> u16

Get channel ID

Source: webrtc.joule:874

fn label(&self) -> &str

Get channel label

Source: webrtc.joule:879

fn protocol(&self) -> &str

Get protocol

Source: webrtc.joule:884

fn state(&self) -> DataChannelState

Get state

Source: webrtc.joule:889

fn is_open(&self) -> bool

Check if channel is open

Source: webrtc.joule:894

fn buffered_amount(&self) -> usize

Get buffered amount

Source: webrtc.joule:899

fn send_string(&mut self, data: &str) -> Result<(), DataChannelError>

Source: webrtc.joule:905

fn send_binary(&mut self, data: &[u8]) -> Result<(), DataChannelError>

Source: webrtc.joule:911

fn send(&mut self, msg: DataChannelMessage) -> Result<(), DataChannelError>

Source: webrtc.joule:915

fn recv(&mut self) -> Option<DataChannelMessage>

Source: webrtc.joule:927

fn close(&mut self)

Source: webrtc.joule:933

enum DataChannelMessage

Source: webrtc.joule:942

fn len(&self) -> usize

Source: webrtc.joule:948

fn is_string(&self) -> bool

Source: webrtc.joule:955

fn as_string(&self) -> Option<&str>

Source: webrtc.joule:959

fn as_binary(&self) -> Option<&[u8]>

Source: webrtc.joule:966

struct PeerConnectionConfig

Source: webrtc.joule:980

fn default() -> Self

Source: webrtc.joule:990

enum BundlePolicy

Source: webrtc.joule:1001

enum SignalingState

Source: webrtc.joule:1009

enum PeerConnectionState

Source: webrtc.joule:1020

struct PeerConnection

Peer connection

Source: webrtc.joule:1030

fn new(config: PeerConnectionConfig) -> Self

Create new peer connection

Source: webrtc.joule:1044

fn create_data_channel(&mut self, label: &str, config: DataChannelConfig) -> Result<u16, WebRtcError>

Source: webrtc.joule:1062

fn data_channel(&mut self, id: u16) -> Option<&mut DataChannel>

Get data channel by ID

Source: webrtc.joule:1079

fn create_offer(&mut self) -> Result<SessionDescription, WebRtcError>

Source: webrtc.joule:1085

fn create_answer(&mut self) -> Result<SessionDescription, WebRtcError>

Source: webrtc.joule:1100

fn set_local_description(&mut self, sdp: SessionDescription) -> Result<(), WebRtcError>

Source: webrtc.joule:1119

fn set_remote_description(&mut self, sdp: SessionDescription) -> Result<(), WebRtcError>

Source: webrtc.joule:1126

fn add_ice_candidate(&mut self, candidate: IceCandidate) -> Result<(), WebRtcError>

Source: webrtc.joule:1156

fn start_connection(&mut self) -> Result<(), WebRtcError>

Source: webrtc.joule:1161

fn build_sdp(&self, sdp_type: SdpType) -> Result<SessionDescription, WebRtcError>

Source: webrtc.joule:1179

fn signaling_state(&self) -> SignalingState

Get signaling state

Source: webrtc.joule:1193

fn connection_state(&self) -> PeerConnectionState

Get connection state

Source: webrtc.joule:1198

fn ice_connection_state(&self) -> IceConnectionState

Get ICE connection state

Source: webrtc.joule:1203

fn local_description(&self) -> Option<&SessionDescription>

Get local description

Source: webrtc.joule:1208

fn remote_description(&self) -> Option<&SessionDescription>

Get remote description

Source: webrtc.joule:1213

fn close(&mut self)

Source: webrtc.joule:1219

enum SdpType

Source: webrtc.joule:1235

struct SessionDescription

Source: webrtc.joule:1244

fn from_sdp(sdp_type: SdpType, sdp: &str) -> Result<Self, WebRtcError>

Parse from SDP string

Source: webrtc.joule:1255

fn to_sdp(&self) -> String

Convert to SDP string

Source: webrtc.joule:1283

enum WebRtcError

Source: webrtc.joule:1324

fn from(e: IceError) -> Self

Source: webrtc.joule:1332

enum IceError

Source: webrtc.joule:1338

fn from(e: std::io::Error) -> Self

Source: webrtc.joule:1348

fn from(e: super::udp::UdpError) -> Self

Source: webrtc.joule:1354

enum DataChannelError

Source: webrtc.joule:1360

fn test_ice_candidate_sdp()

Source: webrtc.joule:1375

fn test_priority_calculation()

Source: webrtc.joule:1388

fn test_stun_request()

Source: webrtc.joule:1398

fn test_session_description()

Source: webrtc.joule:1405

fn test_data_channel_config()

Source: webrtc.joule:1420