Book Image

Learning Node.js for Mobile Application Development

Book Image

Learning Node.js for Mobile Application Development

Overview of this book

Table of Contents (21 chapters)
Learning Node.js for Mobile Application Development
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
14
Creating an E-Commerce Application Using the Ionic Framework
Index

WebSockets


To avoid polling, we need a full-duplex solution, where the server can communicate directly with the client without the latter's initiative. Today, perhaps the most advanced and prevalent solution for this is the WebSocket protocol. A WebSocket protocol is a direct, two-way connection between the client and the server over the TCP protocol. It is structured in a way that allows both sides of the connection to initiate data transfer on their own. WebSockets were standardized in 2011 and are supported in all major browsers.