Project developed for the Computer Networks course (Redes de Computadores) > BSc in Informatics Engineering - University of Coimbra (FCTUC)
This project implements a distributed Client-Server system for managing online classes and broadcasting news/content using TCP/IP, UDP, and IP Multicast protocols. The system allows professors to create classes and broadcast messages, while students can subscribe to classes and receive real-time updates via multicast groups.
- Multithreaded Server: Handles multiple concurrent TCP clients using POSIX threads (
pthread). - Hybrid Communication: Uses TCP for session control and reliable commands, UDP for administrative tasks, and Multicast (IGMP) for efficient message broadcasting.
The system supports three types of users, defined in the configuration file:
-
Student (Aluno):
- View available classes (
LIST_CLASSES). - Subscribe to classes (
SUBSCRIBE_CLASS) to join the multicast group. - View subscribed classes (
LIST_SUBSCRIBED). - Receive real-time messages broadcasted to the class.
- View available classes (
-
Professor:
- All Student permissions.
- Create new classes with a specific capacity (
CREATE_CLASS). - Send multicast messages/news to a specific class (
SEND).
-
Administrator:
- Remote management via UDP console.
- Add new users (
ADD_USER). - Delete users (
DEL). - List all registered users (
LIST).
- Language: C
- Networking: BSD Sockets (TCP/UDP), IP Multicast
- Concurrency:
pthread(POSIX Threads) - Tools: GCC, Make, GNS3 (for network simulation)
A Makefile is included to compile both the server and the client. Simply run:
make