Java for network programming

Network programming is all about making a program running on one computer talk to a program running on another computer. It's a lot of fun and, of course, it's the BIG THING in computing today.

The Java library package java.net provides lots of useful classes and methods for networking. For example, the class InetAddress handles Internet addresses, both as host names and as IP addresses. The OO approach in designing the Java library classes is to model each internet concept as a class. So, the important classes are InetAddress, URL, Socket. We will look at these in turn.


Topics:

  1. Section 1 - Internet software concepts
  2. Section 2 - handling internet addresses - IP addresses and domain names
  3. Section 3 - programming using URL's
  4. Sections 4 - programming clients using sockets
  5. Section 5 - programming servers using sockets


bibliography


To understand the network Java programs discussed here, you need to understand:

  1. the general pattern for an application
  2. the Java event-handling model and how to create a GUI interface
  3. creating new objects from library classes
  4. exception handling
  5. something of streams in Java
  6. multi-threading


All the programs are applications (not applets) because they need the privilege to access the network and remote computers.