Book
Program Source [Complete
zip file] |
Chapter 1: Introducing
the Cookbook Client |
|
simple-client.c |
Open a port and read
server's message. |
Chapter 2: TCP/IP
Network Language Fluency |
|
test-port-client.c |
The Simple Client is
expanded to include sending a message and selecting any
port. |
Chapter 3: Different
Types of Internet Packets |
|
snooper.c |
Listen to the packets
on the network. |
Chapter 4: Sending
Messages Between Peers |
|
connected-peer.c |
Listen to the packets
on the network. |
|
connectionless-receiver.c connectionless-sender.c |
Pass messages between
programs. |
|
http-client.c |
Display the reply to an
HTTP request. |
|
ttcp-client.c ttcp-server.c |
Send transaction TCP
messages (T/TCP) between client and server (Linux does not yet
support this protocol). |
|
udp-reconnect.c udp-server.c |
Demonstrates connecting
and reconnecting using UDP. |
Chapter 6: A Server
Primer |
|
html-ls-server.c |
Creates an HTML page
from the directory listing. |
|
simple-server.c |
Simple echo
server. |
Chapter 7: Dividing
the Load: Multitasking |
|
parent-child.c |
Trivial task-creation
example. |
|
echo-process.c echo-thread.c trivial-server.c |
Multitasked echo
servers. |
|
exec-server.c ls-server.c |
Examples of servers
that call exec(). |
|
html-ls-server.c http-dir.c serverls.c |
Various multitasked ls
or directory servers. |
|
thread-mutex.c |
Example showing threads
with mutexes. |
Chapter 8: Choosing
When to Wait for I/O |
|
demand-accept.c |
Simple on-demand
servlet creator. |
|
echo-timeout.c |
Implementation of a
connection timeout. |
Chapter 9: Breaking
Performance Barriers |
|
bored-child.c |
Example of servlets
that terminate if not enough activity. |
|
capped-servlets.c |
Creates servlets up to
a spoecified point. Keeps the host from overloading. |
|
fair-load.c |
Balances the servlet
load between tasks and select()s. |
|
heartbeat-client.c heartbeat-server.c |
Example of how to
manually determine if a server or client drops out. |
|
preforking-servlets.c |
Creates tasks ahead of
time in anticipation of a connection. |
|
servlet-chummer.c |
An example to solve the
dynamic connections and load problem. |
|
servlets-ondemand.c |
Creates as many
servlets as accepted connections. |
|
smart-select.c |
Combines multitasking
with select() system call. |
|
test-server.c |
General server
tester. |
|
urgent-receiver.c urgent-sender.c |
Example of send and
receiving urgent (out of band) messages. |
Chapter 10:
Designing Robust Linux Sockets |
|
sigpipe-client.c sigpipe-server.c |
Example of getting and
capturing the EPIPE signal. |
Chapter 12: Using
Java's Networking API |
|
DatagramIO.java |
Datagram
messenger |
|
SimpleEchoClient.java SimpleEchoServer.java |
Client/server without
I/O stream translation. |
|
EchoClient.java EchoServer.java |
Client/server with I/O
stream translation. |
|
ObjectReceiver.java ObjectSender.java |
Sending and receiving
objects. |
|
SimpleMulticastDestination.java SimpleMulticastSource.java |
Simple multicast
example. |
|
SimplePeerDestination.java SimplePeerSource.java
|
Simple datagram
example. |
|
MessageGroupWindow.java MessageWindow.java |
GUI-based
datagram/multicast examples. |
|
ThreadedEchoServer.java |
Threaded echo
server. |
|
WindowChat.java |
GUI-based socket (TCP)
messenger. |
|
ErrorDialog.java |
General GUI error
display. |
|
IPv6Test.java |
IPv6-support
verifier. |
Chapter 13:
Designing and Using a C++ Socket Framework |
|
socket.cpp socket.h |
Entire C++
framework. |
|
echo-client.cpp echo-server.cpp |
Echo client/server
example. |
|
broadcast-peer.cpp multicast-peer.cpp |
Broadcast/multicast
examples. |
|
peer-caller.cpp peer-replier.cpp |
Dual program example
for datagrams. |
|
peer.cpp |
Peer-to-peer datagram
example. |