github.com/pion/webrtc/v3@v3.2.24/examples/data-channels-detach/README.md (about)

     1  # data-channels-detach
     2  data-channels-detach is an example that shows how you can detach a data channel. This allows direct access the the underlying [pion/datachannel](https://github.com/pion/datachannel). This allows you to interact with the data channel using a more idiomatic API based on the `io.ReadWriteCloser` interface.
     3  
     4  The example mirrors the data-channels example.
     5  
     6  ## Install
     7  ```
     8  export GO111MODULE=on
     9  go get github.com/pion/webrtc/v3/examples/data-channels-detach
    10  ```
    11  
    12  ## Usage
    13  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.