售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Practical XMPP
Practical XMPP
Credits
About the Authors
About the Reviewers
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
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. An Introduction to XMPP and Installing Our First Server
What is XMPP?
Uses of XMPP
XMPP and the Web
Installing Node.js and library dependencies
Installing our XMPP server
Installing the server
Configuring the server
Testing our setup
Creating a test account
Installing an XMPP client
Summary
2. Diving into the Core XMPP Concepts
Introducing the Jabber ID
Message routing
Basic building blocks of XMPP communication
<presence/>
Presence subscriptions
Directed Presence
Client capabilities
Presence overloading
<message/>
Delivery receipts
XHTML-IM
Chat state notifications
<iq/>
Summary
3. Building a One-on-One Chat Bot - The "Hello World" of XMPP
C2S connection life cycle
Authenticating with a server
Installing node-xmpp-client
Building our echo bot
Creating a new user
Connecting to the server
Telling the server we're online
Listening for incoming stanzas
Reading the chat stanza with ltx
Responding to incoming messages
Extending our echo bot
Responding to presence subscription requests
Returning results from DuckDuckGo Instant Answers API
Sending chat state notifications
Signing off
Summary
4. Talking XMPP in the Browser Using XMPP-FTW
Interacting with XMPP in the browser
BOSH
The WebSocket protocol
Introducing XMPP-FTW
Installing XMPP-FTW
Playing with XMPP-FTW using the demo application
Talking to our bot from the browser
Building a WebSocket-enabled web server in Node.js
Talking WebSockets from a browser
Installing XMPP-FTW and getting messaging!
Chatting with our XMPP bot
Login
Interacting with the chat bot
Seeing what the chat bot is up to...
Hello (hello, hello...)! Is there anybody out there?
Summary
5. Building a Multi-User Chat Application
The basics of MUC
Joining a room
Your role and identity within a room
Sending and receiving messages
Discovering MUC
Configuring our chat room using data forms
The basics of the data form
Getting our MUC room configuration
Updating the room configuration
Data forms in XMPP-FTW
Creating a chat room
Managing the users
Configuration updates
Leaving a room
Destroying the room
Building with XMPPMUC
Updating Prosody to provide an MUC service
Connecting with our XMPP client
Extending our chat bot to work with an MUC
Writing a browser-based MUC client
Setting things up server-side
Building the client
Connecting anonymously
Listing the available chat rooms
Where the action happens
Displaying the chat room HTML and handling users
Handling incoming messages
Sending a message
Wrapping up
Summary
6. Make Your Static Website Real-Time
Are we there yet?
Interacting with Publish-Subscribe
Discovery
Subscribing
Subscriptions, affiliations, and access models
Creating and configuring nodes
Retrieving items
Publishing items
Making your website real-time
Configuring Prosody
Building a server-side publishing mechanism
Building our real-time client
Setting up the server
Lining up our static website
Let's get real-time...
Subscribing to a node
Retrieving historical results
Getting real-time
Taking things further
Summary
7. Creating an XMPP Component
Connection flow for components
Configuring a component in Prosody
Building our first XMPP component
Creating a component and connecting it to the server
Receiving a stanza and responding to a DISCO#info query
Responding to a chat message
Creating a client that connects to the component
Running your new component and client
Summary
8. Building a Basic XMPP-Based Pong Game
Overview of Basic XMPP Pong
Getting Started
Developing the HTML canvas
Adding the mouse listeners for moving the paddle
Drawing and updating the game
Sending and receiving XMPP messages in Pong
Sending and receiving a Hello message
Sending a paddle update
Receiving a paddle update
Connecting the clients
Advertising the Pong feature of clients (Client DISCO)
Issues with a basic implementation
Summary
9. Enhancing XMPPong with a Server Component and Custom Messages
Designing the information flow for XMPPong
Developing the XMPP component for XMPPong
Setting up a game loop in the component
Starting and updating the game
Maintaining the ball state in the component
Bounces and misses
Expecting paddle updates
Implementing messages from the component to the clients
Handling incoming messages from the clients
Handing DISCO#info requests
Creating an XMPP-FTW extension to read messages within our namespace
Developing the client
Starting the XMPP-FTW server
Checking in to the component and receiving dimensions
Drawing code in the client
Modifying the browser view
Running the server and clients
Summary
10. Real-World Deployment and XMPP Extensions
Server Modules
DNS setup and SRV records
Server-to-server communications
XMPP security
XMPP scalability
User Registration
About the XMPP Standards Foundation
XMPP and the new rise of multi-user chat
XMPP and the Internet of Things
XMPP and Universal Plug-n-Play
XMPP and WebRTC
The Future of XMPP
Summary
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜