6
Client-server programming
This section introduces the packages java.net
and java.rmi
that are used to access things across the internet. [There should be one more section, devoted to the class URL
].
| 6-1 | Sockets | ||
| 6-2 | A ``database'' on the web | ||
| 6-3 | Distributed objects |
Classes and interfaces
The package java.io
contains classes to read and write objects from a stream:
The package java.net
contains classes to directly access sockets or to access objects that can be addressed using Universal Resource Locators (URLs).
![]()
DatagramPacket
![]()
DatagramSocket
![]()
InetAddress
![]()
ServerSocket
![]()
Socket
![]()
URL
The package java.rmi
and some subpackages contain classes to distribute Java objects across several programs and share their use. Some tools help: rmic
in generating and compiling the sources and rmiregistry
in distributed operation.