O'Reilly logo

Unity Multiplayer Games by Alan Stagner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

Overview of PubNub

Unlike traditional TCP or UDP communication methods, PubNub is based around HTTP. Users are divided by application, into ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required