Getting Started with HTML5 WebSocket Programming

Develop and deploy your first secure and scalable real-time web application
Preview in Mapt

Getting Started with HTML5 WebSocket Programming

Vangos Pterneas

Develop and deploy your first secure and scalable real-time web application
Mapt Subscription
FREE
$29.99/m after trial
eBook
$12.60
RRP $17.99
Save 29%
Print + eBook
$29.99
RRP $29.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$12.60
$29.99
$29.99p/m after trial
RRP $17.99
RRP $29.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Getting Started with HTML5 WebSocket Programming Book Cover
Getting Started with HTML5 WebSocket Programming
$ 17.99
$ 12.60
WebSocket Essentials – Building Apps with HTML5 WebSockets Book Cover
WebSocket Essentials – Building Apps with HTML5 WebSockets
$ 23.99
$ 16.80
Buy 2 for $29.40
Save $12.58
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781782166962
Paperback110 pages

Book Description

WebSockets are capable of bi-directional, full-duplex communication over a persistent TCP connection They provide many benefits compared to the alternatives (for example, long-polling or Comet), such as lower overhead, persistent connections, and low latency. In short, it is the most technically challenging HTML5 feature to implement, but for truly interactive websites, it's a technology worth learning.

Getting Started with HTML5 WebSocket Programming gives you the true power of bi-directional communication, implemented by using the brand new HTML5 WebSocket API. You’ll learn how to configure the server and clients, how to transmit different types of data and how to secure the whole system.

This book will introduce you to the WebSocket world. We start by introducing the WebSocket API, and continue with practical, real-world examples until we can determine how to build multi-functional web apps for any type of device.

You will learn how to configure a web client and a web server that will help you send messages to others using easy-to-use mechanisms. We will also find out how different data types, such as images and videos, can be transferred with little effort. We present additional fallback techniques and solutions for older browsers too. Finally, we will secure our clients from malicious attacks and other threats.

Table of Contents

Chapter 1: WebSocket – a Handshake!
Life before WebSocket
Then came HTML5
The WebSocket protocol
Mobile?
The future is now
What are we going to make?
Summary
Chapter 2: The WebSocket API
HTML5 basics
A chatting application
API overview
Summary
Chapter 3: Configuring the Server
Why do I need a WebSocket server?
Setting up the server
Connecting to the web server
Other methods
The complete source code
Summary
Chapter 4: Data Transfer – Sending, Receiving, and Decoding
What kinds of data can WebSockets transfer?
Putting it all together
Summary
Chapter 5: Security
WebSocket headers
Common attacks
WebSocket native defence mechanisms
Security toolbox
Summary
Chapter 6: Error Handling and Fallbacks
Error handling
Fallback solutions
Summary
Chapter 7: Going Mobile (and Tablet, Too)
Why mobile matters
Going native
What about the iPad?
Summary

What You Will Learn

  • Understand the concepts of the WebSocket API and why it is superior to the existing techniques
  • Implement a WebSocket client that will connect to a remote server and transmit messages to other clients
  • Configure a WebSocket server using your existing skills and knowledge
  • Implement native WebSocket clients for mobile and tablet devices
  • Support older browsers that do not support HTML5 WebSockets

Authors

Table of Contents

Chapter 1: WebSocket – a Handshake!
Life before WebSocket
Then came HTML5
The WebSocket protocol
Mobile?
The future is now
What are we going to make?
Summary
Chapter 2: The WebSocket API
HTML5 basics
A chatting application
API overview
Summary
Chapter 3: Configuring the Server
Why do I need a WebSocket server?
Setting up the server
Connecting to the web server
Other methods
The complete source code
Summary
Chapter 4: Data Transfer – Sending, Receiving, and Decoding
What kinds of data can WebSockets transfer?
Putting it all together
Summary
Chapter 5: Security
WebSocket headers
Common attacks
WebSocket native defence mechanisms
Security toolbox
Summary
Chapter 6: Error Handling and Fallbacks
Error handling
Fallback solutions
Summary
Chapter 7: Going Mobile (and Tablet, Too)
Why mobile matters
Going native
What about the iPad?
Summary

Book Details

ISBN 139781782166962
Paperback110 pages
Read More

Read More Reviews

Recommended for You

Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
Responsive Web Design with HTML5 and CSS3 Book Cover
Responsive Web Design with HTML5 and CSS3
$ 23.99
$ 4.80
Object-Oriented JavaScript - Second Edition Book Cover
Object-Oriented JavaScript - Second Edition
$ 29.99
$ 21.00
AngularJS Web Application Development Blueprints Book Cover
AngularJS Web Application Development Blueprints
$ 29.99
$ 21.00
Git: Version Control for Everyone Book Cover
Git: Version Control for Everyone
$ 23.99
$ 16.80
Data Visualization with D3.js Cookbook Book Cover
Data Visualization with D3.js Cookbook
$ 26.99
$ 18.90