Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
Foreword
About the Authors
About the Technical Reviewer
Acknowledgments
Chapter 1: Introduction to HTML5 WebSocket
What is HTML5?
HTML5 Connectivity
Overview of Older HTTP Architectures
HTTP 101 (or rather, HTTP/1.0 and HTTP/1.1)
The Long Way Around: HTTP Polling, Long Polling, and Streaming
Introducing WebSocket
Why Do You Need WebSocket?
WebSocket is about Performance
WebSocket is about Simplicity
WebSocket is about Standards
WebSocket is about HTML5
You Need WebSocket!
WebSocket and RFC 6455
The World of WebSocket
WebSocket Options
The WebSocket Community: It Lives!
Applications of WebSocket
Related Technologies
Server-Sent Events
SPDY
Web Real-Time Communication
Summary
Chapter 2: The WebSocket API
Overview of the WebSocket API
Getting Started with the WebSocket API
The WebSocket Constructor
WebSocket Events
WebSocket Methods
WebSocket Object Attributes
WebSocket Object Attribute: bufferedAmount
Putting It All Together
Checking for WebSocket Support
Using HTML5 Media with WebSocket
Summary
Chapter 3: The WebSocket Protocol
Before the WebSocket Protocol
A Brief History of the Internet
The Web and HTTP
Introducing the WebSocket Protocol
WebSocket: Internet Capabilities for Web Applications
Inspecting WebSocket Traffic
The WebSocket Protocol
The WebSocket Opening Handshake
Computing the Key Response
Message Format
The WebSocket Closing Handshake
Support for Other Protocols
Extensions
Writing a WebSocket Server in JavaScript with Node.js
Building a Simple WebSocket Server
Testing Our Simple WebSocket Server
Building a Remote JavaScript Console
Summary
Chapter 4: Building Instant Messaging and Chat over WebSocket with XMPP
Layered Protocols
XMPP: A Streaming Mile of XML
Standardization
Choosing a Connectivity Strategy
Federation
Building a Chat and Instant Messaging Application over WebSocket
Using a WebSocket-Enabled XMPP Server
Setting Up Test Users
The Client Library: Strophe.js
Connecting and Getting Started
Presence and Status
Exchanging Chat Messages
Pings and Pongs
Completed Chat Application
Suggested Extensions
Build a User Interface
Use XMPP Extensions
Connect to Google Talk
Summary
Chapter 5: Using Messaging over WebSocket with STOMP
Overview of Publish and Subscribe Models
Introduction to STOMP
Getting Started with Web Messaging
Setting Up a Message Broker
Seeing STOMP Concepts in Action
Building a STOMP over WebSocket Application
The Flow of the Game
Creating the Game
Monitoring Apache ActiveMQ
Suggested Extensions
The Future of Web Messaging
Summary
Chapter 6: VNC with the Remote Framebuffer Protocol
An Overview of Virtual Network Computing
An Overview of the Remote Framebuffer Protocol
Binary- and Text-Oriented Protocols
Choosing to Use RFB over WebSocket
Building a VNC (RFB) Client over WebSocket
Setting Up a Proxy Server
The RFB Client115
Using HTML5 <canvas> to Draw a Framebuffer
Handling Input in the Client
Putting It All Together
Enhancing the Application
Summary
Chapter 7: WebSocket Security
WebSocket Security Overview
WebSocket Security Features
Origin Header
Headers with the “Sec-” Prefix
WebSocket Secure Handshake: Accept Keys
HTTP Proxies and Masking
Secure WebSocket Uses TLS (You Should, Too!)
Authentication
Application Level Security
Application Authentication
Application Authorization
Summary
Chapter 8: Deployment Considerations
Overview of WebSocket Application Deployment
WebSocket Emulation and Fallback
Plugins
Polyfills
Different Abstraction Layers
Proxies and Other Network Intermediaries
Reverse Proxies and Load Balancing
Traverse Proxies and Firewalls with Transport Layer Security (TLS or SSL)
Deploying TLS
WebSocket Pings and Pongs
WebSocket Buffering and Throttling
Monitoring
Capacity Planning
Socket Limits
WebSocket Application Deployment Checklist
Summary
Appendix A: Inspecting WebSocket Traffic
WebSocket Frame Inspection with Google Chrome Developer Tools
Google Chrome Network Internals
Analyzing Network Packets with Wireshark
Summary
Appendix B: WebSocket Resources
Using the Virtual Machine
WebSocket Servers
Index
← Prev
Back
Next →
← Prev
Back
Next →