19

Data Streams

I’m mad as hell and I’m not going to take this anymore!

—Howard Beale, Network

In this chapter:

 Sockets

 Servers

 Clients

 Multi-user processing

 Serial communication

19-1 Network communication

In this chapter, I will use the Processing network library to create sketches that talk to each other in real-time. Examples of this are multi-user applications such as games, instant messenger, and chat (among other things).

In Chapter 18, I looked at how you can request the raw source of a URL using loadStrings(), loadXML(), and loadJSON(). You make the request, sit back, and await the results. You may have noticed that this process does not happen instantaneously. Sometimes the program may pause for seconds (or even minutes) while a document ...

Get Learning Processing, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.