rent-now

Rent More, Save More! Use code: ECRENTAL

5% off 1 book, 7% off 2 books, 10% off 3+ books

9780123742551

TCP/IP Sockets in Java

by Calvert; Donahoo
  • ISBN13:

    9780123742551

  • ISBN10:

    0123742552

  • eBook ISBN(s):

    9780123742551

  • Additional ISBN(s):

    9780080568782

  • Edition: 2nd
  • Format: Paperback
  • Copyright: 2/8/2008
  • Publisher: Elsevier Science
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $30.95 Save up to $20.52
  • Digital
    $15.64*
    Add to Cart

    DURATION
    PRICE
    *To support the delivery of the digital material to you, a digital delivery fee of $3.99 will be charged on each digital item.

Summary

The networking capabilities of the Java platform have been extended considerably since the first edition of the book. This new edition covers version 1.5-1.7, the most current iterations, as well as making the following improvements: The API (application programming interface) reference sections in each chapter, which describe the relevant parts of each class, have been replaced with (i) a summary section that lists the classes and methods used in the code, and (ii) a ?gotchas? section that mentions nonobvious or poorly-documented aspects of the objects. In addition, the book covers several new classes and capabilities introduced in the last few revisions of the Java platform. New abstractions to be covered include NetworkInterface, InterfaceAddress, Inet4/6Address, SocketAddress/InetSocketAddress, Executor, and others; extended access to low-level network information; support for IPv6; more complete access to socket options; and scalable I/O. The example code is also modified to take advantage of new language features such as annotations, enumerations, as well as generics and implicit iterators where appropriate. Most Internet applications use sockets to implement network communication protocols. This book's focused, tutorial-based approach helps the reader master the tasks and techniques essential to virtually all client-server projects using sockets in Java. Chapter 1 provides a genral overview of networking concepts to allow readers to synchronize the concepts with terminology. Chapter 2 introduces the mechanics of simple clients and servers. Chapter 3 covers basic message construction and parsing. Chapter 4 then deals with techniques used to build more robust clients and servers. Chapter 5 (NEW) introduces the scalable interface facilities which were introduced in Java 1.5, including the buffer and channel abstractions. Chapter 6 discusses the relationship between the programming constructs and the underlying protocol implementations in more detail. Programming concepts are introduced through simple program examples accompanied by line-by-line code commentary that describes the purpose of every part of the program. The book's Web site contains many examples of command-based sockets-related code discussed throughout the book. No other resource presents so concisely or so effectively the material necessary to get up and running with Java sockets programming. KEY FEATURES * Focused, tutorial-based instruction in key sockets programming techniques allows reader to quickly come up to speed on Java applications. * Concise and up-to-date coverage of the most recent platform (1.7) for Java applications in networking technology * Provides code for all example programs via a companion Web site to let the reader see the important objects and methods in context and to understand the purpose of each line of code.

Author Biography

Kenneth L. Calvert is a professor at the University of Kentucky, where he teaches and researches computer network systems.

Table of Contents

Prefacep. xi
Introductionp. 1
Networks, Packets, and Protocolsp. 1
About Addressesp. 4
About Namesp. 6
Clients and Serversp. 6
What Is a Socket?p. 7
Exercisesp. 8
Basic Socketsp. 9
Socket Addressesp. 9
TCP Socketsp. 15
TCP Clientp. 16
TCP Serverp. 21
Input and Output Streamsp. 25
UDP Socketsp. 26
DatagramPacketp. 27
UDP Clientp. 29
UDP Serverp. 34
Sending and Receiving with UDP Socketsp. 36
Exercisesp. 38
Sending and Receiving Datap. 39
Encoding Informationp. 40
Primitive Integersp. 40
Strings and Textp. 45
Bit-Diddling: Encoding Booleansp. 47
Composing I/O Streamsp. 48
Framing and Parsingp. 49
Java-Specific Encodingsp. 55
Constructing and Parsing Protocol Messagesp. 55
Text-Based Representationp. 58
Binary Representationp. 61
Sending and Receivingp. 63
Wrapping Upp. 71
Exercisesp. 71
Beyond the Basicsp. 73
Multitaskingp. 73
Java Threadsp. 74
Server Protocolp. 76
Thread-per-Clientp. 80
Thread Poolp. 82
System-Managed Dispatching: The executor Interfacep. 84
Blocking and Timeoutsp. 86
accept(), read(), and receive()p. 87
Connecting and Writingp. 87
Limiting Per-Client Timep. 87
Multiple Recipientsp. 89
Broadcastp. 90
Multicastp. 90
Controlling Default Behaviorsp. 95
Keep-Alivep. 96
Send and Receive Buffer Sizep. 96
Timeoutp. 97
Address Reusep. 97
Eliminating Buffering Delayp. 98
Urgent Datap. 98
Lingering after Closep. 99
Broadcast Permissionp. 99
Traffic Classp. 100
Performance-Based Protocol Selectionp. 100
Closing Connectionsp. 101
Appletsp. 107
Wrapping Upp. 107
Exercisesp. 108
Niop. 109
Why Do We Need This?p. 109
Using Channels with Buffersp. 112
Selectorsp. 115
Buffers in Detailp. 121
Buffer Indicesp. 121
Buffer Creationp. 122
Storing and Retrieving Datap. 124
Preparing Buffers: clear(), flip(), and rewind()p. 126
Compacting data in a Bufferp. 128
Buffer Perspectives: duplicate(), slice(), etc.p. 129
Character Codingp. 131
Stream (TCP) Channels in Detailp. 132
Selectors in Detailp. 135
Registering Interest in Channelsp. 135
Selecting and Identifying Ready Channelsp. 138
Channel Attachmentsp. 140
Selectors in a Nutshellp. 140
Datagram (UDP) Channelsp. 141
Exercisesp. 145
Under the Hoodp. 147
Buffering and TCPp. 150
Deadlock Dangerp. 152
Performance Implicationsp. 155
TCP Socket Life Cyclep. 155
Connectingp. 156
Closing a TCP Connectionp. 160
Demultiplexing Demystifiedp. 163
Exercisesp. 165
Bibliographyp. 167
Indexp. 169
Table of Contents provided by Ingram. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program