Version: v3.0.32 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2021 License: MIT Imports: 5 Imported by: 0



data-channels is a Pion WebRTC application that shows how you can send/recv DataChannel messages from a web browser


Download data-channels
export GO111MODULE=on
go get
Open data-channels example page

Run data-channels, with your browsers SessionDescription as stdin

In the jsfiddle the top textarea is your browser's session description, copy that and:


Run echo $BROWSER_SDP | data-channels

  1. Paste the SessionDescription into a file.
  2. Run data-channels < my_file
Input data-channels's SessionDescription into your browser

Copy the text that data-channels just emitted and copy into second text area

Hit 'Start Session' in jsfiddle

Under Start Session you should see 'Checking' as it starts connecting. If everything worked you should see New DataChannel foo 1

Now you can put whatever you want in the Message textarea, and when you hit Send Message it should appear in your terminal!

Pion WebRTC will send random messages every 5 seconds that will appear in your browser.

Congrats, you have used Pion WebRTC! Now start building something cool


The Go Gopher

There is no documentation for this package.

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL