售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Socket.IO Cookbook
Table of Contents
Socket.IO Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Wiring It Up
Introduction
Creating a Node HTTP server with Socket.IO
Getting ready
How to do it…
How it works…
There's more…
Creating an Express server with Socket.IO
Getting ready
How to do it…
How it works…
See also
Using Socket.IO as a cross-browser WebSocket
Getting ready
How to do it…
How it works…
There's more…
See also
Debugging on the client
Getting ready
How to do it…
How it works…
There's more…
See also
Debugging on the server
Getting ready
How to do it…
How it works…
There's more…
2. Creating Real-Time Dashboards
Introduction
Loading static data from the server
Getting ready
How to do it…
How it works…
There's more…
Creating a server-side clock
How to do it…
How it works…
Loading data from MongoDB
Getting ready
How to do it…
How it works…
Real-time analytics
How to do it…
How it works…
There's more…
Handling connection timeouts
Getting ready
How to do it…
How it works…
3. Having Two-Way Conversations
Introduction
Creating a simple chat room
Getting ready
How to do it…
How it works…
There's more…
Managing the socket life cycle
How to do it…
How it works…
Emitting a private message to another socket
Getting ready
How to do it…
How it works…
Sending messages to all the sockets, except for the sender
How to do it…
How it works…
Building a multiplayer tic-tac-toe game
Getting ready
How to do it…
How it works…
4. Building a Room with a View
Introduction
Creating chat channels with namespaces
Getting ready
How to do it…
How it works…
Joining rooms
Getting ready
How to do it…
How it works…
Leaving rooms
Getting ready
How to do it…
How it works…
Listing rooms the socket is in
Getting ready
How to do it…
How it works…
There's more…
Creating private rooms
Getting ready
How to do it…
How it works…
Setting up a default room
Getting ready
How to do it…
How it works…
5. Securing Your Data
Introduction
Implementing basic authentication
Getting ready
How to do it…
How it works…
Performing token-based authentication
Getting ready
How to do it…
How it works…
Handling server-side validation
Getting ready
How to do it…
How it works…
Locking down the HTTP referrer
How to do it…
How it works…
Using secure WebSockets
Getting ready
How to do it…
How it works…
6. Performing a Load Balancing Act
Introduction
Performing load balancing with the Nginx server
Getting ready
How to do it…
How it works…
Using the Node.js cluster
Getting ready
How to do it…
How it works…
Using Redis to pass events between nodes
Getting ready
How to do it…
How it works…
Using Memcached to manage multiple nodes
Getting ready
How to do it…
How it works…
Using RabbitMQ to message events across nodes
Getting ready
How to do it…
How it works…
7. Streaming Binary Data
Introduction
Broadcasting an image to other sockets
Getting ready…
How to do it…
How it works…
There's more…
Uploading an image to the filesystem
Getting ready…
How to do it…
How it works…
Uploading an image to Amazon S3
Getting ready…
How to do it…
How it works…
Streaming audio
How to do it…
How it works…
Streaming live video
How to do it…
How it works…
8. Integrating with Mobile Applications
Introduction
Throwing an alert when the socket connects
Getting ready
How to do it…
How it works…
Pushing up data from the server
Getting ready
How to do it…
How it works…
Responding to tap events from the device
How to do it…
How it works…
Doing server-side pagination
Getting ready
How to do it…
How it works…
Triggering hot deploys
How to do it…
How it works…
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜