Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

6. WebSockets

Chapter 6. WebSockets

Traditionally HTTP is not very good for live communications. The communication stream is controlled by the client and is really designed for the case where the client wants to load or set data from time to time. A number of methods have been used to simulate TCP-socket-like behavior over HTTP but none of them works very well. HTML5 introduced the idea of WebSockets, a full-on, bi-directional communication channel between the browser and a server.

In some ways WebSockets take the opposite approach to dealing with interactions between the browser and the client than REST does. REST is built around the idea that the browser (or other client) will send a number of discrete requests to the server of the form, show this data, or perform some action.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint