Tutorial tips
Sockets, which provide a mechanism for communication between two computers, have been around since long before the Java language was a glimmer in James Gosling's eye. The language simply lets you use sockets effectively without having to know the details of the underlying operating system. Most books that focus on Java coding either fail to cover the topic, or leave a lot to the imagination. This tutorial will tell you what you really need to know to start using sockets effectively in your Java code. Specifically, we'll cover:
- What sockets are
- Where they fit into the structure of programs you're likely to write
- The simplest sockets implementation that could possibly work -- to help you understand the basics
- A detailed walkthrough of two additional examples that explore sockets in multithreaded and pooled environments
- A brief discussion of an application for sockets in the real world
If you can describe how to use the classes in the java.net package, this tutorial is probably a little basic for you, although it might be a good refresher. If you have been working with sockets on PCs and other platforms for years, the initial sections might bore you. But if you are new to sockets, and simply want to know what they are and how to use them effectively in your Java code, this tutorial is a great place to start.

