Book Image

Practical XMPP

By : Lloyd Watkin, Steven Watkin, Koelle
Book Image

Practical XMPP

By: Lloyd Watkin, Steven Watkin, 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 (11 chapters)
Free Chapter
1
1. An Introduction to XMPP and Installing Our First Server

Modifying the browser view


One last thing we need to do is go to the index.ejs file and change some things there. Using the same index.ejs as from the previous chapter, we’re going to change the opponent field with a field that will let us indicate which server we wish to connect to – in other words, the component JID of the XMPPong game.

The way this would work in reality is that a client would use DISCO to discover the capabilities of the server. If the response indicated that there was an XMPPong capability available on the server, this would be made available to the client – provided that the client understands how to play Pong, of course!

In index.ejs, simply change the phrase Opponent JID to Component JID, and change the id of opponent to componentJid.