Files
webrtc/examples/data-channels-detach
2025-06-19 23:44:08 +03:00
..
2025-06-19 23:44:08 +03:00
2025-01-18 07:16:06 -06:00
2024-03-16 21:15:04 -04:00

data-channels-detach

data-channels-detach is an example that shows how you can detach a data channel. This allows direct access the underlying pion/datachannel. This allows you to interact with the data channel using a more idiomatic API based on the io.ReadWriteCloser interface.

The example mirrors the data-channels example.

Install

go install github.com/pion/webrtc/v4/examples/data-channels-detach@latest

Usage

The example can be used in the same way as the data-channel example or can be paired with the data-channels-detach-create example. In the latter case; run both example and exchange the offer/answer text by copy-pasting them on the other terminal.