CS 457 Project 1: Simple Chat ClientVersion
1.0, Mon Aug 21 UPDATE
(Mon,
Aug 27): reference executables from the TA are
now
available: chat_32, and chat_64.
Note that chat_32 should work on both 32 and 64-bit
machines, whereas
chat_64 only works on 64-bit machines. Don't
forget to change file permissions after download to make
it executable.
In Linux simply type: $chmod a+x chat_32 //
make
the file executable by all Introduction In this project you will use socket programming to
implement a simple chat client. This assignment will consist of one program which acts as
both the client and the server. The program will
communicate simple messages back and forth starting with
the client sending to the server. Your code must work on
the Linux machines in the 120 Linux Lab. Test your code by
running your client on one machine and your server on
another. Chat will be strictly back and forth, after
sending a message, the program waits to receive a message
before sending again (see example interaction). Messages
may be up to 140 characters and should be checked by the
program. Print an error message and ask for a new message
if the user inputs more than 140 characters. You will
write three files for this assignment: chat.(c|cpp),
README, makefile. Requirements for each are stated below. Chat Example:
Input too long example:
chat.(c|cpp) RequirementsThe program is invoked in two ways: Server
Client
READMEYou must include a readme that explains to a potential
user the process of invoking your program. You may assume
that the user is familiar with using terminal programs.
Also include questions that you asked the TA and the
answer to those questions and any assumptions you have
made along the way (hint: ask before assuming!). makefile requirementsYou must include a makefile that produces an executable
called chat. Interaction RequirementsPrograms will be randomly paired up and will have their client and server tested with the other's client and server. To make this possible, you must follow the packet format specified below.
Where the Version is always 457, the Str. Length is the length of the message in bytes, and the message follows immediately afterwards. To test this, your TA has written a test client and a test server so that you can check your interactions. The executable will be available on this site by Monday, August 27 at 5pm. Grading
Turn in your assignment by e-mailing a tar archive of the files to [akshah at cs dot colostate dot edu]. Be sure that the files are at the root of the archive and not in any folders. Include your last name and the last name of your team member, if any. Only one file per team needs to be submitted. |
|||||||||