Book Image

Practical XMPP

By : Steven Watkin, David Koelle
Book Image

Practical XMPP

By: Steven Watkin, David Koelle

Overview of this book

XMPP (eXtensible Messaging and Presence Protocol) is a messaging protocol that enables communication between two or more devices via the Internet. With this book, developers will learn about the fundamentals of XMPP, be able to work with the core functionality both server-side and in the browser, as well as starting to explore several of the protocol extensions. You will not only have a solid grasp of XMPP and how it works, but will also be able to use the protocol to build real-world applications that utilize the power of XMPP. By the end of this book, you will know more about networking applications in general, and have a good understanding of how to extend XMPP, as well as using it in sample applications.
Table of Contents (16 chapters)
Practical XMPP
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
An Introduction to XMPP and Installing Our First Server

Developing the client


One of the cool things about having a server with a known set of expected messages is that the clients can look like anything you can imagine, as long as they send and respond to the expected set of messages. Not every client needs to look alike nor have the same output – for example, there’s no reason we couldn’t have one of our XMPPong players gaming from a terminal window! We will keep our client basic, since we want to demonstrate the use of XMPP rather than get crazy with HTML and CSS, but you are welcome to be as creative as you'd like here. In fact, you could toss in some D3 or even create a client using Unity or any other framework, as long as you can send and receive those XMPP messages.

Recall from the table earlier in this chapter that we need our browser (in this case) to connect to the XMPP-FTW server and expect, or send, the following events:

  • Send a request to the client  wishes to connect to a game (outgoing: playercheckingin)
  • Listen for default dimensions...