Book Image

Learning WebRTC

By : Daniel M. Ristic
Book Image

Learning WebRTC

By: Daniel M. Ristic

Overview of this book

Table of Contents (16 chapters)
Learning WebRTC
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Getting a connection


The steps required to create a WebRTC connection are required to be real-time. This means that clients will have to be able to transfer messages between each other in real time without using a WebRTC peer connection. This is where we will utilize another powerful feature of HTML5 called WebSockets.

A WebSocket is exactly what it sounds like—an open bidirectional socket connection between two endpoints—a web browser and a web server. You can send messages back and forth over the socket using strings and binary information. It is designed to be implemented in both web browsers and web servers to enable communication between them, outside of the realm of AJAX requests.

The WebSocket protocol has been around since about 2010 and is a well-defined standard that is available in most browsers today. It has wide support across web clients, and many server technologies have frameworks dedicated to their use. There are even entire frameworks that rely on WebSocket technology such...