The Java Socket Classes

Java, of course, was developed by Sun. Sun earned its reputation as a leading developer of UNIX workstations—much of the Internet runs on Sun servers. It's not surprising, therefore, that Java is designed from the ground up as a networking language. This overview shows how Java makes network programming easier by encapsulating connection functionality in socket classes:

  • Socket is the basic object in Internet communication and supports the TCP/IP protocol. The Transmission Control Protocol/Internet Protocol (TCP/IP) is a reliable stream network connection. The Socket class provides methods for stream I/O, which make reading from and writing to Socket easy.

  • ServerSocket is an object used by Internet server programs for listening ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.