rustrtc
A pure Rust implementation of WebRTC.
Features
- PeerConnection: The main entry point for WebRTC connections.
- Data Channels: Support for reliable and unreliable data channels.
- Media Support: RTP/SRTP handling for audio and video.
- ICE/STUN: Interactive Connectivity Establishment and STUN protocol support.
- DTLS: Datagram Transport Layer Security for secure communication.
- SDP: Session Description Protocol parsing and generation.
Usage
Here is a simple example of how to create a PeerConnection and handle an offer:
use ;
async
Examples
You can run the examples provided in the repository.
Echo Server
The echo server example demonstrates how to accept a WebRTC connection, receive data on a data channel, and echo it back. It also echoes video tracks.
-
Run the server:
-
Open your browser and navigate to
http://127.0.0.1:3000.
License
This project is licensed under the MIT License.