万本电子书0元读

万本电子书0元读

顶部广告

Socket.IO Cookbook电子书

售       价:¥

33人正在读 | 1人评论 6.2

作       者:Tyson Cadenhead

出  版  社:Packt Publishing

出版时间:2015-10-15

字       数:69.9万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(1条)
  • 读书简介
  • 目录
  • 累计评论(1条)
Over 40 recipes to help you create real-time JavaScript applications using the robust Socket.IO frameworkAbout This BookCreate secure WebSocket connections and real-time mobile applications using Socket.IODevise efficient messaging systems between the server side and the client sideA step-by-step implementation guide to help you create elements of Socket.IO application Who This Book Is For If you have some knowledge of JavaScript and Node.js and want to create awe-inspiring application experiences using real time communication, then this book is for you. Developers with knowledge of other *ing languages should also be able to easily follow along.What You Will LearnBuild rich and interactive real-time dashboards using Socket.IO to pipe in data as it becomes availableDesign chat and multiple-person interfaces that leverage Socket.IO for communicationSegment conversations to rooms and namespaces so that every socket doesn’t have to receive every messageSecure your data by implementing various authentication techniques, locking down the HTTP referrer and using secure WebSocketsLoad balance across multiple server-side nodes and keep your WebSockets in sync using Redis, RabbitMQ or MemcachedStream binary data such as audio and video in real-time over a Socket.IO connectionCreate real-time experiences outside of the browser by integrating Socket.IO with hybrid mobile applications In Detail Socket.IO is a JavaScript library that provides you with the ability to implement real-time analytics, binary streaming, instant messaging, and document collaboration. It has two parts: a client-side library that runs in the browser, and a server-side library for node.js. Socket.IO is event-driven and primarily uses the WebSocket protocol that allows us to emit data bi-directionally from the server and the client. Socket.IO This book is a complete resource, covering topics from webSocket security to scaling the server-side of a Socket.IO application and everything in between. This book will provide real-world examples of how secure bi-directional, full-duplex connections that can be created using Socket.IO for different environments. It will also explain how the connection vulnerabilities can be resolved for large numbers of users and huge amounts of data/messages. By the end of the book, you will be a competent Socket.IO developer. With the help of the examples and real-world solutions,you will learn to create fast, scalable, and dynamic real-time apps by creating efficient messaging systems between the server side and the client side using Socket.IO.Style and approach This book is written in a cookbook-style format and provides practical, immediately usable task-based recipes that show you how to create the elements of a Socket.IO application.
目录展开

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

累计评论(1条) 1个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部