
Lesson 1: Socket Communications
[>]
Java Programming Language Basics, Part 1, finished with a simple network communications
example using the Remote Method Invocation (RMI) application programming interface (API).
The RMI example allows multiple client programs to communicate with the same server
program without any explicit code to do this because the RMI API is built on sockets and
threads.
This lesson presents a simple sockets-based program to introduce the concepts of sockets and
multi-threaded programming. A multi-threaded program performs multiple tasks at one time
such as fielding simultaneous requests from many client programs.
- What are Sockets and Threads?
- About the Examples
- Example 1: Server-Side Program
- Example 1: Client-Side Program
- Example 2: Multithreaded Server Example
- More Information
Note: See Creating a Threaded Slide Show Applet for another example of how
multiple threads can be used in a program.
