Chapter 5. PubNub – The Global Chatbox
In this chapter, we will be covering a radically different networking system known as PubNub. PubNub differs from most traditional networking systems, in which it uses HTTP to communicate, rather than straight TCP or UDP sockets. While PubNub does not work well for twitch-based games requiring low latency or authoritative server setups, it is just fine for other forms of communication such as instant messaging.
In this chapter, we'll learn:
- How PubNub works over HTTP
- Parsing JSON returned from PubNub
- Building a WWW wrapper around PubNub
- Creating a global chatbox application