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

Apress - The Definitive Guide To HTML5 Websocket.pdf

Apress - The Definitive Guide To HTML5 Websocket.pdf. Apress - The Definitive Guide To HTML5 Websocket.pdf. Open. Extract. Open with. Sign In. Main menu.

7MB Sizes 7 Downloads 311 Views

Recommend Documents

Apress - HTML5 And Javascript Projects.pdf
Try one of the apps below to open or edit this item. Apress - HTML5 And Javascript Projects.pdf. Apress - HTML5 And Javascript Projects.pdf. Open. Extract.

Apress - Pro HTML5 Games.pdf
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 ...

Apress - Practical HTML5 Projects.pdf
Whoops! There was a problem previewing this document. Retrying... Download ... Apress - Practical HTML5 Projects.pdf. Apress - Practical HTML5 Projects.pdf.

Apress - Pro HTML5 with Visual Studio 2015.pdf
www.it-ebooks.info. Page 3 of 435. Apress - Pro HTML5 with Visual Studio 2015.pdf. Apress - Pro HTML5 with Visual Studio 2015.pdf. Open. Extract. Open with.

Apress - Beginning WebGL For HTML5.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item.

Apress - HTML5 Programming For ASP .NET Developers.pdf ...
www.it-ebooks.info. Page 3 of 379. Apress - HTML5 Programming For ASP .NET Developers.pdf. Apress - HTML5 Programming For ASP .NET Developers.pdf.