This first assignment is meant as a warm-up exercise to get reacquainted
with socket programming. You must implement an IRC server that
USER messages only well enough to
perform a single user registration as shown in Example IRC Communications.
Take into account that a barely minimal server that meets these
requirements, and passes most of the automated tests for this assignment, can be
written in roughly 50 lines of C code (in fact, we will give you those
50 lines of code). However, although this kludgy solution will get you a
near perfect score on the tests, it will earn you a zero on the design grade.
So, you should start implementing your solution with the requirements of the rest of the project in mind. More specifically, your solution to this assignment should meet the following requirements:
RPL_WELCOMEonly after the
USERmessages have been received.
USERmessages, and compose the correct
Although not required for this assignment, you should take into account
that the remaining two parts of the project will involve adding support
for additional messages and replies. Any time you spend writing a message parser and
constructor (that works with more than just
be time well spent. However, if your solution to this assignment takes some
shortcuts by assuming that you will only be dealing with the
USER messages and the
RPL_WELCOME reply, you will not be
penalized for it.
Your server must be implemented in C, and must use sockets. There should be no need for you to use pthreads at this point.