Book Image

WebRTC Blueprints

By : Andrii Sergiienko
Book Image

WebRTC Blueprints

By: Andrii Sergiienko

Overview of this book

Table of Contents (13 chapters)
WebRTC Blueprints
About the Author
About the Reviewers

Developing a signaling server

There are still no major changes in the signaling server that we developed in the first chapter, so we can use it here for the new application.

The only change that we need to implement in the application that was developed in Chapter 1, Developing a WebRTC Application, is related to HTTPS and the proxy that we just discussed. We need to change the path where the server will accept requests from clients.

Edit the www/apps/rtc_server/src/rtcserver_app.erl file.

Find the following piece of code there:

Dispatch = cowboy_router:compile([
                                     {"/", handler_websocket,[]}
{ok, _} = cowboy:start_http(websocket, 100, [{port, 30000}], [

Change the preceding code to the following one:

Dispatch = cowboy_router:compile([
                                {"/signaling", handler_websocket,[]}