(0) items

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

TCP/IP Sockets in C : Practical Guide for Programmers



by ;
Pub. Date:
Elsevier Science Ltd
List Price: $33.95

Rent Textbook


Buy New Textbook

Usually Ships in 3-5 Business Days



Used Textbook

We're Sorry
Sold Out

More New and Used
from Private Sellers
Starting at $7.44

Questions About This Book?

Why should I rent this book?

Renting is easy, fast, and cheap! Renting from can save you hundreds of dollars compared to the cost of new or used books each semester. At the end of the semester, simply ship the book back to us with a free UPS shipping label! No need to worry about selling it back.

How do rental returns work?

Returning books is as easy as possible. As your rental due date approaches, we will email you several courtesy reminders. When you are ready to return, you can print a free UPS shipping label from our website at any time. Then, just return the book to your UPS driver or any staffed UPS location. You can even use the same box we shipped it in!

What version or edition is this?

This is the 2nd edition with a publication date of 3/17/2009.

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 CDs, lab manuals, study guides, etc.
  • The Rental copy of this book is not guaranteed to include any supplemental materials. You may receive a brand new copy, but typically, only the book itself.
  • The eBook copy of this book is not guaranteed to include any supplemental materials. Typically only the book itself is included.


Written by two experienced networking instructors, this text's focused, tutorial-based approach enables the reader to master the tasks and techniques essential to virtually all client-server projects using sockets in C.

Author Biography

Michael J. Donahoo teaches networking on the undergraduate and graduate level at Baylor University, Where he is an associate professor. He has authored Socket programming books for a variety of languages and an SQL book. Kenneth L. Calvert is a professor at the University of Kentucky, where he teaches and researches computer network systems. He has been writing socket programs with TCP/IP for almost twenty years.

Table of Contents

Preface to the Second Editionp. ix
Introductionp. 1
Networks, Packets, and Protocolsp. 1
About Addressesp. 4
Writing Down IP Addressesp. 4
Dealing with Two Versionsp. 5
Port Numbersp. 5
Special Addressesp. 6
About Namesp. 7
Clients and Serversp. 7
What Is a Socket?p. 8
Basic TCP Socketsp. 11
IPv4 TCP Clientp. 11
IPv4 TCP Serverp. 17
Creating and Destroying Socketsp. 22
Specifying Addressesp. 23
Generic Addressesp. 23
IPv4 Addressesp. 24
IPv4 Addressesp. 24
Generic Address Storagep. 25
Binary/String Address Conversionp. 26
Getting a Socket's Associated Addressesp. 26
Connecting a Socketp. 27
Binding to an Addressp. 27
Handling Incoming Connectionsp. 28
Communicationp. 30
Using IPv6p. 30
Of Names and Address Familiesp. 35
Mapping Names to Numbersp. 35
Accessing the Name Servicep. 36
Details, Detailsp. 40
Writing Address-Generic Codep. 41
Generic TCP Clientp. 43
Generic TCP Serverp. 46
IPv4-IPv6 Interoperationp. 49
Getting Names from Numbersp. 50
Using UDP Socketsp. 53
UDP Clientp. 54
UDP Serverp. 57
Sending and Receiving with UDP Socketsp. 60
Connecting a UDP Socketp. 61
Sending and Receiving Datap. 63
Encoding Integersp. 64
Sizes of Integersp. 64
Byte Orderingp. 66
Signedness and Sign Extensionp. 67
Encoding Integers by Handp. 68
Wrapping TCP Sockets in Streamsp. 71
Structure Overlays: Alignment and Paddingp. 73
Strings and Textp. 76
Bit-Diddling: Encoding Booleansp. 78
Constructing, Framing, and Parsing Messagesp. 79
Framingp. 86
Text-Based Message Encodingp. 91
Binary Message Encodingp. 94
Putting It All Togetherp. 96
Wrapping Upp. 97
Beyond Basic Socket Programmingp. 99
Socket Optionsp. 99
Signalsp. 100
Nonblocking I/Op. 106
Nonblocking Socketsp. 107
Asynchronous I/Op. 108
Timeoutsp. 112
Multitaskingp. 116
Per-Client Processesp. 117
Per-Client Threadp. 123
Constrained Multitaskingp. 126
Multiplexingp. 128
Multiple Recipientsp. 133
Broadcastp. 134
Multicastp. 137
Broadcast vs. Multicastp. 142
Under the Hoodp. 143
Buffering and TCPp. 145
Deadlock Dangerp. 148
Performance Implicationsp. 149
TCP Socket Life Cyclep. 150
Connectingp. 150
Closing a TCP Connectionp. 154
Demultiplexing Demystifiedp. 158
Socket Programming in C++p. 161
PracticalSocket Library Overviewp. 162
Plus One Servicep. 164
Plus One Serverp. 164
Plus One Clientp. 166
Running Server and Clientp. 168
Survey Servicep. 168
Survey Support Functionsp. 169
Survey Serverp. 172
Survey Clientp. 176
Running Server and Clientp. 178
Survey Service, Mark 2p. 178
Socket Address Supportp. 179
Socket Iostream Interfacep. 180
Enhanced Survey Serverp. 181
Enhanced Survey Clientp. 186
Administrative Clientp. 187
Running Server and Clientsp. 188
Referencesp. 191
Indexp. 193
Table of Contents provided by Ingram. All Rights Reserved.

Please wait while the item is added to your cart...