Next: Labs
Up: Computer Networks/Computer Networks and
Previous: Lecture Notes
Subsections
This archive
contains various
helper functions for both servers and clients (take a look at the
header for details). You are welcome to use it in your assignments,
but first make sure you understand what happens in there. In other
words, keep it someplace and refer to it once you are presented with
new TCP-related concepts; the archive may contain examples of use for
these concepts. You are not expected to understand all the code at
once, concepts shall be introduced as the course progresses.
This archive
contains the
various functions for TCP clients you have seen already
(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).
You have seen a client, so we now have a server in
this archive
for a change.
Besides the known tcp-utils module (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)
Next: Labs
Up: Computer Networks/Computer Networks and
Previous: Lecture Notes
Stefan Bruda
2012-02-08