https://github.com/sroman0/psr
PSR - Network Systems Programming is a project developed during the "Programmazione di Sistemi in Rete" (Network Systems Programming) course at UniversitΓ degli Studi del Sannio. This repository provides practical implementations focused on web systems programming, with a particular emphasis on using UDP and TCP sockets in both C and Java.
https://github.com/sroman0/psr
c-programming concurrency educational-project html http java network-systems process-synchronization producer-consumer reader-writer restful-api tcp-socket udp-socket
Last synced: 3 months ago
JSON representation
PSR - Network Systems Programming is a project developed during the "Programmazione di Sistemi in Rete" (Network Systems Programming) course at UniversitΓ degli Studi del Sannio. This repository provides practical implementations focused on web systems programming, with a particular emphasis on using UDP and TCP sockets in both C and Java.
- Host: GitHub
- URL: https://github.com/sroman0/psr
- Owner: sroman0
- License: gpl-3.0
- Created: 2024-05-25T08:19:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-19T20:01:07.000Z (3 months ago)
- Last Synced: 2025-02-19T21:19:36.835Z (3 months ago)
- Topics: c-programming, concurrency, educational-project, html, http, java, network-systems, process-synchronization, producer-consumer, reader-writer, restful-api, tcp-socket, udp-socket
- Language: Java
- Homepage:
- Size: 287 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PSR - Network Systems Programming
This repository contains practical implementations developed during the *"Programmazione di Sistemi in Rete (PSR)"* (Network Systems Programming) course at **UniversitΓ degli Studi del Sannio**. The project focuses on web systems programming with an emphasis on TCP and UDP socket communication in both **C** and **Java**. It includes examples of client-server architectures, concurrent connection handling, and data transmission over networks.
---
## π Table of Contents
- [Project Overview](#project-overview)
- [Repository Structure](#repository-structure)
- [Requirements](#requirements)
- [Installation and Usage](#installation-and-usage)
- [1. Clone the Repository](#1-clone-the-repository)
- [2. Compile and Run (C Projects)](#2-compile-and-run-c-projects)
- [3. Compile and Run (Java Projects)](#3-compile-and-run-java-projects)
- [Implemented Features](#implemented-features)
- [Testing and Results](#testing-and-results)
- [License](#license)
- [Acknowledgments](#acknowledgments)---
## π Project Overview
The **PSR** project aims to provide hands-on experience with network programming concepts and practical implementations. It covers:
- **TCP and UDP communication**
- **Client-server models** in both C and Java
- **Concurrent connections management** (e.g., multi-threaded servers)
- **Data serialization and transmission** techniques
- **Socket creation and management** in different scenarios (e.g., echo servers, file transfer applications)This repository serves as a learning tool for understanding low-level network communication and building robust networked applications.
---
## ποΈ Repository Structure
```
PSR/
βββ C/
β βββ tcp_server.c # TCP server implementation in C
β βββ tcp_client.c # TCP client implementation in C
β βββ udp_server.c # UDP server implementation in C
β βββ udp_client.c # UDP client implementation in C
β βββ Makefile # Build automation for C programs
βββ Java/
β βββ TCPServer.java # TCP server implementation in Java
β βββ TCPClient.java # TCP client implementation in Java
β βββ UDPServer.java # UDP server implementation in Java
β βββ UDPClient.java # UDP client implementation in Java
βββ tests/ # Test scripts and sample data
βββ results/ # Execution logs and output files
βββ LICENSE # Project license information
βββ README.md # Project documentation
```---
## βοΈ Requirements
Ensure you have the following installed:
- **GCC** compiler (for C programs)
- **Java JDK** (version 8 or higher)
- **Make** (for compiling C projects)
- Terminal or command-line interface for running programs### Install Dependencies (Ubuntu/Debian):
```bash
sudo apt update
sudo apt install build-essential default-jdk
```---
## π Installation and Usage
### 1. Clone the Repository
```bash
git clone https://github.com/sroman0/PSR.git
cd PSR
```### 2. Compile and Run (C Projects)
#### Compile all C programs:
```bash
cd C
make all
```
#### Run TCP Server and Client:
```bash
./tcp_server
./tcp_client
```
#### Run UDP Server and Client:
```bash
./udp_server
./udp_client
```### 3. Compile and Run (Java Projects)
#### Navigate to the Java folder and compile:
```bash
cd ../Java
javac TCPServer.java TCPClient.java UDPServer.java UDPClient.java
```
#### Run TCP Server and Client:
```bash
java TCPServer
java TCPClient
```
#### Run UDP Server and Client:
```bash
java UDPServer
java UDPClient
```---
## π‘ Implemented Features
- **TCP and UDP Servers/Clients**: Establish and manage connections.
- **Concurrent Servers**: Handle multiple clients simultaneously.
- **Reliable and Unreliable Data Transmission**: Demonstrate the differences between TCP and UDP.
- **File Transfer Applications**: Send and receive files over the network.
- **Error Handling**: Robust error detection and reporting.---
## π§ͺ Testing and Results
- Test scripts are available in the `tests/` directory.
- Execution results and logs can be found in the `results/` folder.
- Example test run:
```bash
./tests/test_tcp_connection.sh
./tests/test_udp_packet_loss.sh
```---
## π License
This project is licensed under the **GNU General Public License v3.0**.
See the [LICENSE](https://github.com/sroman0/PSR/blob/main/LICENSE) file for details.---
## π Acknowledgments
Developed during the *"Programmazione di Sistemi in Rete (PSR)"* course at **UniversitΓ degli Studi del Sannio**.
Special thanks to the instructors and classmates for their support and guidance.