Skip to content

FredericoMendes10/RC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Reservation System (ES)

A client-server application for managing event reservations, implemented in C++ using raw POSIX sockets. Developed as a Computer Networks course project.

The system uses UDP for lightweight operations (login, logout, listing) and TCP for operations involving larger payloads (creating events with file attachments, reservations, viewing event details).

Architecture

client/   → user CLI (user.cpp, commands.cpp)
server/   → Event Server (es.cpp)
common/   → shared utilities (common.cpp, constants.hpp)

Features

Command Protocol Description
login <uid> <pass> UDP Log in or register a new user
logout UDP Log out of the current session
unregister UDP Delete user account
list TCP List all available events
myevents / mye UDP List events created by the logged-in user
myreservations / myr UDP List reservations made by the logged-in user
create <name> <file> <date> <time> <seats> TCP Create a new event with a file attachment
reserve <eid> <seats> TCP Reserve seats for an event
show <eid> TCP Show event details and download its file
close <eid> TCP Close an event (owner only)
changePass <old> <new> TCP Change account password
exit Exit the client (must be logged out first)

Requirements

  • Linux
  • g++ with C++17 support

Build

make

This produces two executables: ES (server) and user (client).

Usage

1. Start the server:

./ES [-p ESport] [-v]
  • -p ESport — port to listen on (default: 58016)
  • -v — verbose mode

2. Start the client:

./user [-n ESIP] [-p ESport]
  • -n ESIP — IP address of the server (default: localhost)
  • -p ESport — server port (default: 58016)

Example session:

> login 000001 mypasswd
new user registered
> create SummerFest poster.pdf 25-07-2026 20:00 200
the event was successfully created, EID = 1
> list
1 SummerFest 1: Accepting reservations 25-07-2026 20:00
> reserve 1 2
accepted
> myreservations
1 25-07-2026 20:00 2
> logout
successful logout

Clean

make clean

About

Client-server app for managing event reservations over raw POSIX sockets (UDP/TCP), built for the Computer Networks course 2025/2026.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors