The Definitive Guide To HTML5 WebSocket

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 200

DownloadThe Definitive Guide To HTML5 WebSocket
Open PDF In BrowserView PDF
www.it-ebooks.info

For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.

www.it-ebooks.info

Contents at a Glance
Foreword���������������������������������������������������������������������������������������� xiii
About the Authors���������������������������������������������������������������������������� xv
About the Technical Reviewer������������������������������������������������������� xvii
Acknowledgments�������������������������������������������������������������������������� xix
■■Chapter 1: Introduction to HTML5 WebSocket�������������������������������� 1
■■Chapter 2: The WebSocket API����������������������������������������������������� 13
■■Chapter 3: The WebSocket Protocol��������������������������������������������� 33
■■Chapter 4: Building Instant Messaging and Chat
over WebSocket with XMPP��������������������������������������������������������� 61
■■Chapter 5: Using Messaging over WebSocket with STOMP���������� 85
■■Chapter 6: VNC with the Remote Framebuffer Protocol������������� 109
■■Chapter 7: WebSocket Security�������������������������������������������������� 129
■■Chapter 8: Deployment Considerations�������������������������������������� 149
■■Appendix A: Inspecting WebSocket Traffic��������������������������������� 163
■■Appendix B: WebSocket Resources�������������������������������������������� 177
Index���������������������������������������������������������������������������������������������� 183

v
www.it-ebooks.info

Chapter 1

Introduction to HTML5
WebSocket
This book is for anyone who wants to learn how to build real-time web applications.
You might say to yourself, “I already do that!” or ask “What does that really mean?” Let’s
clarify: this book will show you how to build truly real-time web applications using a
revolutionary new and widely supported open industry standard technology called
WebSocket, which enables full-duplex, bidirectional communication between your client
application and remote servers over the Web—without plugins!
Still confused? So were we a few years ago, before we started working with HTML5
WebSocket. In this guide, we’ll explain what you need to know about WebSocket, and
why you should be thinking about using WebSocket today. We will show you how to
implement a WebSocket client in your web application, create your own WebSocket
server, use WebSocket with higher-level protocols like XMPP and STOMP, secure traffic
between your client and server, and deploy your WebSocket-based applications. Finally,
we will explain why you should be thinking about using WebSocket right now.

What is HTML5?
First, let’s examine the “HTML5” part of “HTML5 WebSocket.” If you’re already an expert
with HTML5, having read, say, Pro HTML5 Programming, and are already developing
wonderfully modern and responsive web applications, then feel free to skip this section
and read on. But, if you’re new to HTML5, here’s a quick introduction.
HTML was originally designed for static, text-based document sharing on the
Internet. Over time, as web users and designers wanted more interactivity in their HTML
documents, they began enhancing these documents, by adding form functionality and
early “portal” type capabilities. Now, these static document collections, or web sites,
are more like web applications, based on the principles of rich client/server desktop
applications. These web applications are being used on almost any device: laptops, smart
phones, tablets—the gamut.
HTML5 is designed to make the development of these rich web applications easier,
more natural, and more logical, where developers can design and build once, and deploy
anywhere. HTML5 makes web applications more usable, as well, as it removes the need
for plugins. With HTML5, you now use semantic markup language like 
instead of
. Multimedia is also much easier to code, by using tags like 1 www.it-ebooks.info CHAPTER 1 ■ Introduction to HTML5 WebSocket

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.6
Linearized                      : No
Language                        : en
Page Layout                     : SinglePage
Page Count                      : 200
Page Mode                       : UseNone
Has XFA                         : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:08:04
Create Date                     : 2013:02:09 15:13:35+05:30
Creator Tool                    : Adobe InDesign CS3 (5.0.4)(Infix Pro)
Modify Date                     : 2013:03:26 13:22:04+02:00
Metadata Date                   : 2013:03:26 13:22:04+02:00
Producer                        : Acrobat Distiller 9.0.0 (Windows); modified using iText 5.0.3_SNAPSHOT (c) 1T3XT BVBA
Format                          : application/pdf
Title                           : The Definitive Guide to HTML5 WebSocket
Description                     : Apress
Creator                         : Vanessa Wang
Document ID                     : uuid:644c4fbd-4e3b-404d-ad6b-ba2266b4b072
Instance ID                     : uuid:daa8dd2d-64e7-48b1-aed6-09bdd18afeff
ICN App Name                    : Infix Pro
ICN App Platform                : Windows
ICN App Version                 : 5.23
Author                          : Vanessa Wang
Subject                         : Apress
Www It-ebooks Info              : {0C23F91E-8B0B-458C-831D-C7768D737A44}
EXIF Metadata provided by EXIF.tools

Navigation menu