tcp-utils.h and tcp-utils.cc), and code for a simple
client that does roughly the same thing as the parameterized
telnet client (client.cc).
tcp-utils.h and
tcp-utils.cc), the archive contains a simple server, which
receives lines of text from clients and send them back prefixed by a
string. There are in fact three implementations of this server,
produced by the following targets in the associated makefile (the
default target makes them all):
iserv is the iterative variant (listens by default on
port 9000)
ciserv is still iterative in nature, but simulates
concurrency in its sole thread of execution (listens by default on
port 9002)
cserv is the fully concurrent version (listens by default
on port 9001)
tserv.cc) and another which features a monitor thread
(mtserv.cc). The implementation of the monitor is for all
practical purposes identical to the one presented in Section 12.8 of
the textbook. These two new servers are
here.
This archive
contains yet another
addition to our family of servers. Specifically, you have now a
multithreaded server with a control socket opened to local machine
only (mctserv which is also a multiservice server if you think
about it), a multithreaded server that uses preallocation
(mtpserv), and a multiprocess server that also uses
preallocation (cpserv).
We have here
the whole collection of
servers. In addition to what you have seen already, a sort of super
server has been added (see the included README for details).