DUE DATE: Wednesday, May 15, 2002, at 3:30pm
(no late submissions accepted!)
Summary
This project introduces students to the basics
of network programming, different protocols provided by the TCP/IP
protocol suite, and to the Berkeley Sockets API.
Your task for this project is to extend the functionality of your
previous project by adding network support to your application. In order
to do that, you will have to write another separate program, (in addition
to the kernel module and the player) which would
be the music server. The server would listen for incoming connections,
accept them, and play the notes that were sent
over the network using the kernel module from the previous project.
You will also have to re-write PlayTune to add network support
to it. As such, rather than playing the music on the local computer,
it should connect to a specified server, so that the music is played
on the remote computer instead. (Assuming that the server is running.)
To make the project more fun, include support for multiple servers
in your client program. That is, allow the user to play the same tune on
up to four computers at once. (Your client would have to connect to several
servers simultaneously.)
Notes
- Make sure your server does not allow playing of two different tunes
simultaneous, which would surely result in weird noises coming out
of the speaker. (You can try it for fun.) If one tune is
playing, and another one comes in, the server should inform the
remote client that speaker is currently busy.
- The server should keep a log of clients that connect to it
in a log file. Log connection date & time, and client's address & port
numbers.
- If the server name is not specified on the command line, the
player should attempt to play it on the local machine. Do NOT,
however, access the device from your player program; instead, send the request
to the local server. (Connect to localhost or 127.0.0.1).
- The song file to play should be specified on the command line.
- If nothing is specified on the command line, your program should
play the song specified by the TUNE environment variable.
- Standard project guidelines apply: be neat, write comments, check for errors.
- Turn in your assignment ON TIME. You can submit the
project at the time of the final
at the latest. Early submissions are encouraged.
Extra Credit
- (15 pts) Allow the user to play a given tune on an arbitrary number
of computers at once. (It should be interesting to have all 16 computers
in the lab chiming away simultaneously.)
What to turn in
Turn in a printout of your code. Include instructions on running your program.
Place your source files in the submit directories for cs235, located under
/home/submit/cs235/<username>.
You may turn in your source files on a floppy, if you wish.
Alex Fedosov
2002-05-06