SignalingServer

WebRTC signaling server

Go/Golang Server Relay Trickle ICE

Task

As part of my research at Sophia university (上智大学) I had to create a signaling server in order to relay ICE candidates between the peers in a way that one peer can request to be promoted to a streamer and the others can join and watch the stream.

Full paper available

Solution

I decided to create the server using Go, as it is very well suited for networking and building systems. The server uses a "manager" which can create peers as they join and manage the connections between them. If a peer requests to join a stream, the server provides a streamer at random, but that can easily be expanded in a way that the peer can request a specific stream. The server then acts as a relay to move the ICE candidates between the peers and creates a peer to peer connection. After that the peer receiving the stream is disconnected, but the streaming (upgraded) peer remains connected and waits for new peers.

Demo

The project is publicly available on GitHub here.

A demo is available under the Posts, WebRTC testing. The post is a collection of multiple WebRTC projects created to work together and act as a demo of testing WebRTC for streaming purposes. You may take a look here.

Please feel free to take a look!