What is networking and why is it important?
Wikipedia describes the internet, as a global system of interconnected computer
networks.
It's a network of networks, consisting of private, public, academic, business, and
government networks, some of which are local, and some that are global.
The Internet provides a vast range of information resources and services, as we all
know.
COMPLETE JAVA MASTERCLASS
Introduction to Java Networking
Java's support for writing networking code
Java has had support for networking since its first version.
Like many of the other topics in this course, the Java language continues to change.
In this section, I'll start out with the original java.net package, and the types it
provides.
This includes types for low level programming, which work with sockets and
addresses.
It also includes higher level types, that hide or manage connection level details.
COMPLETE JAVA MASTERCLASS
Introduction to Java Networking
Java's alternatives to java.net
I'll also be using this section to introduce you to some exciting new changes.
Channels offer a much more robust way, of communicating between interconnected
devices, and there are several channels we can use for network communications.
In addition, JDK11 also saw the inclusion of the java.net.http package.
This includes support for HTML 2.0, as well as builder patterns, to create instances
of types, specifically used for internet communication.
In addition, this package also gives us the WebSocket type.
Unlike HTTP clients, WebSockets establish persistent connections between the
browser and server, enabling bi-directional communication.
COMPLETE JAVA MASTERCLASS
Introduction to Java Networking