Fundamental Networking in Java    
Esmond Pitt, Fundamental Networking in Java, Springer Verlag 2005, ISBN 1846280303

This book provides complete coverage of fundamental IP networking in Java. It introduces the concepts behind TCP/IP & UDP & their intended use & purpose; gives complete coverage of Java networking APIs, includes an extended discussion of advanced server design, so that the various design principles & tradeoffs concerned are discussed & equips the reader with analytic queuing-theory tools to evaluate design alternatives; covers UDP multicasting, & covers multi-homed hosts, leading the reader to understand the extra programming steps & design considerations required in such environments. After reading this book the reader will have an advanced knowledge of fundamental network design & programming concepts in the Java language, enabling them to design & implement distributed applications with advanced features & to predict their performance. Special emphasis is given to the scalable I/O facilities of Java 1.4 as well as complete treatments of multi-homing & UDP both unicast & multicast.

Buy Fundamental Networking in Java at Amazon.com or Amazon.co.uk or
Amazon.co.jp in the new Japanese translation!

The book covers all fundamental aspects of the Java Socket APIs completely, from top to bottom, in a logical sequence aimed at professional programmers and tertiary (college) courses. It covers Sockets, ServerSockets, DatagramSockets, MulticastSockets, and the associated SocketChannels and Selectors and the very troublesome NIO package. SSL is given special attention, including a reduction-to-practice for the even more troublesome SSLEngine which makes this bizarre apparition finally usable. I have also covered multi-homing in more depth than is customary. I do not cover Telnet, FTP, HTTP, URLs and URLConnections, RMI, CORBA, Swing, &c, which are all well described in other books (one of them by me!).
More....
Fundamental Networking in Java
Author's comments
I wrote this book because of my deep dissatisfaction with the existing Java texts and with Sun's javadoc, as evidenced on the Java Developer Connection forums on which I am well-known. Most of these books try to cover all known aspects of Java networking and IPC in 1280 pages with screen shots, and do it very badly. Some of the smaller books are more specialized but I am afraid that every one of them I have examined is riddled with errors and irrelevancies, including some very well-known titles indeed. In this book I have aimed at being as correct and authoritative as W.R. Stevens in his TCP/IP Illustrated and Unix Network Programming books, which are constantly by my side.

In this book there is no 'Hello World!'; none of the customary pageloads of irrelevant code, and no CD with an out-of-date JDK. Instead there are 400 tightly organized pages packed with matter, from the fundamentals of IP to TCP, scalable TCP, SSL, scalable SSL, UDP, scalable UDP, and multicast, with a special queuing-theory-oriented chapter on server and thread architectures. There are many short and relevant code examples, even more useful tables including a list of networking platform dependencies you aren't supposed to get in Java, several diagrams, and a comprehensive Index. Source code, errata, author biographies, and feedback facilities are available from a Web site.
Reader comments   
This is the best java book on networking I have read.
A note on SO_REUSEADDR and TCP/IP clients   
A discussion of this option, manifested in Java as Socket.setReuseAddress(true), is missing from the book. Click here to read the note.
Discussion forums   
Forums for discussing this book
Errata [PDF]   
Notes on Typesetting Computer Programs [PDF]   
Esmond Pitt B.A. MIEEE FACS
Source Code [ZIP]   
Source code from the book. Note: Updated on 28 August 2007. The SSLEngineManager as published in the book doesn't work well for clients, or for servers in useClientMode: it turns out that it assumed the first action to be a read, i.e. of an incoming TLS/SSL ClientHello message. The updated version in this current .ZIP file works in both client and server mode, i.e. for useClientMode=true or false. I've also added a couple of extra tests for the client mode.
TOC [pdf]   
Table of Contents