Java Reference
In-Depth Information
CHAPTER 21
Networking
Today, writing an application that does not communicate over the Internet in some fash-
ion is rare. From sending data to another machine, to scraping information off remote
web pages, networking plays an integral part in today's computing world. Java makes it
easy to communicate over a network using the New I/O (NIO) and more new I/O fea-
tures for the Java platform (NIO.2) APIs. Java SE 7 included a few new features, en-
abling easier multicasting among other things. With the addition of these new features,
the Java platform contains a plethora of programming interfaces to help accomplish net-
work tasks.
This chapter does not attempt to cover every networking feature that is part of the
Java language, as the topic is quite large. However, it does provide a handful of recipes
that are the most useful to a broad base of developers. You learn about a few of the
standard networking concepts, such as sockets, as well as some newer concepts that
were introduced with the latest release of the Java language. If you find this chapter in-
teresting and want to learn more about Java networking, you can find lots of resources
online. Perhaps the best place to go for learning more is the Oracle documentation at
http://download.oracle.com/javase/tutorial/networking/in-
dex.html .
21-1. Listening for Connections on the
Server
Problem
Search WWH ::




Custom Search