libdatachannel is an open-source software library implementing WebRTC Data Channels, WebRTC Media Transport, and WebSockets. It is written in C++17 and offers C bindings. The source code is available under LGPLv2, and the library is on AUR, Vcpkg, and FreeBSD Ports.


  • Simple API inspired by the JavaScript API including WebSocket for signaling
  • Minimal external dependencies (only OpenSSL or GnuTLS)
  • Lightweight and way easier to compile and use than Google's reference library


  • Compatible with browsers Firefox, Chromium, and Safari, and other WebRTC libraries (see webrtc-echoes)
  • Licensed under LGPLv2, meaning software with any license may link against the library
  • Community-maintained bindings available for Rust, Node.js, and Unity


  • Support for POSIX platforms (including GNU/Linux, Android, Apple macOS, and FreeBSD) and Microsoft Windows
  • Support for both OpenSSL and GnuTLS as TLS backend
  • Code using Data Channels and WebSockets may be compiled as-is to WebAssembly for browsers with datachannel-wasm