In this chapter, we will examine the fundamental aspects of messaging in the Java WebSocket API, which includes many means by which to send and consume messages. We will look at the most straightforward and widespread way to send messages: synchronous sending and receiving of messages. In order to illustrate the concepts and functions we will cover, we will look in detail at the DrawingBoard application. This application uses a Java client front end, so we will introduce the client API of the Java WebSocket API at the same time.
You will remember from Chapter 2 that the WebSocket protocol defines three ...