万本电子书0元读

万本电子书0元读

顶部广告

Socket.IO Real-time Web Application Development_Mini电子书

售       价:¥

60人正在读 | 0人评论 9.8

作       者:Rohit Rai

出  版  社:Packt Publishing

出版时间:2013-02-22

字       数:37.4万

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

温馨提示:此类商品不支持退换货,不支持下载打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Written in an engaging, easy-to-follow style, "Socket.io Real-time Web Application Development" is a practical guide for developing real-time web applications with Node.js and socket.io.This book is aimed at developers who want to start developing highly interactive and real-time web applications like chat systems or online multiplayer games, or want to introduce real-time updates or server push mechanisms in their existing applications. Knowledge of developing in JavaScript and web applications in general is expected. Though there is a chapter on introducing Node.js, prior knowledge of Node.js will be a plus.
目录展开

Socket.IO Real-time Web Application Development

Table of Contents

Socket.IO Real-time Web Application Development

Credits

About the Author

Acknowledgement

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

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Going Real Time on the Web

What is real-time web?

A bit of history

Applications of real-time web

Gaming

Social stream updates

Business applications

Web-based monitors

Summary

2. Getting Started with Node.js

The origin of Node.js

Why Node.js

JavaScript everywhere

Event-driven design

Corporate backing

How to get Node.js

Node.js package manager (npm)

Hello World with Node.js

Hello Web

Routing the requests

HTTP Methods

Creating our own Modules

Serving files

Third party modules and Express JS

Summary

3. Let's Chat

Creating the application

Designing the chat room

Bringing in jQuery

Socket.IO

Handling events

The server

The client

Summary

4. Making It More Fun!

Giving names to users

More on events

Working with namespaces

Rooms

Listing the rooms

Sharing the session

Summary

5. The Socket.IO Protocol

Why do we need another protocol?

The WebSocket API

The Socket.IO API

The Socket.IO socket

The Socket.IO connection

Socket.IO messages

Disconnect (0)

Connect (1)

Heartbeat (2)

Message (3)

JSON message (4)

Event (5)

ACK (6)

Error (7)

NOOP (8)

Summary

6. Deploying and Scaling

The production environment

Running the application

Keeping it running

Scaling

The node cluster

Scaling up the application

Tips for node in production

Summary

A. Socket.IO Quick Reference

The server

Instantiating socket

Starting Socket.IO

Listening to events

Emitting an event

Sending a message

Sending a JSON message

Broadcasting a message/event

Sending a volatile message

Storing socket data

Getting the socket data

Restricting to a namespace

Joining a room

Broadcasting messages/events in a room

Leaving a room

Changing the configuration

Server events

connection

message

disconnect

The client

Connecting to a socket

Listening to events

Emitting an event

Sending a message

Client events

connect

connecting

disconnect

connect_failed

error

message

reconnect

reconnecting

reconnect_failed

B. Socket.IO Backends

Erlang

Google Go

Java

Perl

Python

Summary

Index

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部