July 2022
Beginner
748 pages
15h 1m
English
In this chapter, we will describe and discuss the most popular network protocols – User Datagram Protocol (UDP), Transmission Control Protocol (TCP), HyperText Transfer Protocol (HTTP), and WebSocket – and their support from the Java Class Library (JCL). We will demonstrate how to use these protocols and how to implement client-server communication in Java code. We will also review Uniform Resource Locator (URL)-based communication and the latest Java HTTP Client API. After studying this chapter, you will be able to create server and client applications that communicate using the UDP, TCP, and HTTP protocols as well as WebSocket.
The following topics will be covered in this chapter: