Files
webrtc/examples/data-channels-simple
Sundenis 919c686059 Add simple datachannel example with demo.html (#3252)
This PR adds a new simple -datachannel example to help newcomers
understand how to create and test a basic WebRTC DataChannel using Go
and a static HTML page (demo.html).

- Includes main.go for signaling and WebRTC setup.
- Includes demo.html to test sending/receiving messages.
- Tested locally and works with the provided signaling server.
2025-10-23 09:41:52 +03:00
..

WebRTC DataChannel Example in Go

This is a minimal example of a WebRTC DataChannel using Go (Pion) as the signaling server.

Features

  • Go server for signaling
  • Browser-based DataChannel
  • ICE candidate exchange
  • Real-time messaging between browser and Go server

Usage

  1. Run the server:
go run main.go
  1. Open browser at http://localhost:8080

  2. Send messages via DataChannel and see them in terminal & browser logs.