Computer Networks
Practical exercises #7
- The example code in the lecture uses
getservbyname()
to map well-known services to
port numbers. How is this performed on your generic Unix box? What
about on other systems?
- The example client code given in the lecture is a cut-down version
of this program. Save the program source
code from your browser and try compiling and executing it. Change
the port number to 80, for HTTP, and modify the string sent to the
server so this program can be used for "Web page fetching".
- On ironbark, look at
/usr/local/pub/BITCNE
for
some more sample code for manipulating sockets. Copy the example there
to your directory and try it out.
- To come: lots of sample
Java
code for socket
manipulations...
- For the experienced C++ programmers in the class: investigate the
socket++ libraries on ironbark.
This set of practical exercises accompanies
Tutorial #7.
[Previous Practical]
[Tutorial Index]
[Next Practical]
Copyright © 2000 by
Phil Scott,
La Trobe University.