En Subject
En Subject
En Subject
Summary:
This project is about creating your own IRC server.
You will use an actual IRC client to connect to your server and test it.
Internet is ruled by solid standards protocols that allow connected computers to interact
with each other.
It’s always a good thing to know.
Version: 8
Contents
I Introduction 2
II General rules 3
IV Bonus part 7
1
Chapter I
Introduction
IRC clients connect to IRC servers in order to join channels. IRC servers are connected
together to form a network.
2
Chapter II
General rules
• Your program should not crash in any circumstances (even when it runs out of
memory), and should not quit unexpectedly.
If it happens, your project will be considered non-functional and your grade will be
0.
• You have to turn in a Makefile which will compile your source files. It must not
relink.
• Compile your code with c++ and the flags -Wall -Wextra -Werror
• Your code must comply with the C++ 98 standard. Then, it should still compile
if you add the flag -std=c++98.
• Try to always develop using the most C++ features you can (for example, choose
<cstring> over <string.h>). You are allowed to use C functions, but always prefer
their C++ versions if possible.
3
Chapter III
Mandatory Part
• port: The port number on which your IRC server will be listening to for incoming
IRC connections.
• password: The connection password. It will be needed by any IRC client that tries
to connect to your server.
4
ft_irc Internet Relay Chat
III.1 Requirements
• The server must be capable of handling multiple clients at the same time and never
hang.
• Only 1 poll() (or equivalent) can be used for handling all these operations (read,
write, but also listen, and so forth).
• Several IRC clients exist. You have to choose one of them as a reference. Your
reference client will be used during the evaluation process.
• Your reference client must be able to connect to your server without encountering
any error.
• Communication between client and server has to be done via TCP/IP (v4 or v6).
• Using your reference client with your server must be similar to using it with any
official IRC server. However, you only have to implement the following features:
5
ft_irc Internet Relay Chat
Since MacOS doesn’t implement write() the same way as other Unix
OSes, you are allowed to use fcntl().
You must use file descriptors in non-blocking mode in order to get a
behavior similar to the one of other Unix OSes.
To ensure that your server correctly processes everything that you send to it, the
following simple test using nc can be done:
Use ctrl+D to send the command in several parts: ’com’, then ’man’, then ’d\n’.
In order to process a command, you have to first aggregate the received packets in
order to rebuild it.
6
Chapter IV
Bonus part
Here are the extra features you can add to your IRC server so it looks even more like and
actual IRC server:
• A bot.
7
Chapter V
Turn in your assignment in your Git repository as usual. Only the work inside your repos-
itory will be evaluated during the defense. Don’t hesitate to double check the names of
your files to ensure they are correct.
You are encouraged to create test programs for your project even though they won’t
be submitted and won’t be graded. Those tests could be especially useful to test
your server during defense, but also your peer’s if you have to evaluate another ft_irc
one day. Indeed, you are free to use whatever tests you need during the evaluation process.
16D85ACC441674FBA2DF65190663F432222F81AA0248081A7C1C1823F7A96F0B74495
15056E97427E5B22F07132659EC8D88B574BD62C94BB654D5835AAD889B014E078705
709F6E02