Skip to Content
TCP/IP Sockets in Java, 2nd Edition
book

TCP/IP Sockets in Java, 2nd Edition

by Kenneth L. Calvert, Michael J. Donahoo
August 2011
Intermediate to advanced
192 pages
4h 46m
English
Morgan Kaufmann
Content preview from TCP/IP Sockets in Java, 2nd Edition

Chapter 2. Basic Sockets

You are now ready to learn about writing your own socket applications. We begin by demonstrating how Java applications identify network hosts using the InetAddress and Socket-Address abstractions. Then we present examples of the use of Socket and ServerSocket, through an example client and server that use TCP. Then we do the same thing for the Datagram-Socket abstraction for clients and servers that use UDP. For each abstraction, we list the most significant methods, grouped according to usage, and briefly describe their behavior.[1]

Socket Addresses

Recall that a client must specify the IP address of the host running the server program when it initiates communication. The network infrastructure then uses this destination ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

TCP/IP Sockets in C, 2nd Edition

TCP/IP Sockets in C, 2nd Edition

Michael J. Donahoo, Kenneth L. Calvert

Publisher Resources

ISBN: 9780080568782