Chat-CCP

June 2025

Chat-CCP - Peer-to-Peer Chat Room

Custom TCP Protocol Implementation over UDP

PythonTCP/UDPNetworkingProtocol DesignReal-time ChatVPN Deployment

Chat-CCP is a peer-to-peer chat room application built with Python that demonstrates network communication principles using a custom protocol. This project implements TCP features over UDP sockets to provide deep learning experience about transport layer protocols.

Developed as a major assignment for the Computer Networks course at Institut Teknologi Bandung, this application showcases the implementation of reliable communication protocols in unreliable network environments with global deployment capabilities.

Key Features

  • Implemented custom TCP protocol over UDP with complete segment structure including sequence numbers, checksums, and flags
  • Developed three-way handshake mechanism for reliable connection establishment with random sequence numbers
  • Built sliding window flow control algorithm with 5-segment window size and automatic retransmission
  • Implemented CRC32 checksum for error detection and data integrity verification
  • Created interactive terminal UI with real-time chat, scrollable history, and heartbeat monitoring
  • Deployed globally using Radmin VPN for worldwide accessibility with secure encrypted connections

Technical Implementation

Protocol Design

Custom TCP over UDP with 32-bit sequence numbers and comprehensive flag system

Flow Control

Sliding window algorithm with 5-segment window and 5-second timeout

Error Detection

CRC32 checksum verification and automatic segment rejection

User Interface

Terminal-based UI with Blessed library for enhanced user experience

Connection Management

Heartbeat mechanism with automatic AFK detection and graceful disconnection

Global Deployment

Radmin VPN integration for worldwide access with password protection

Protocol Features

  • TCP Segments: Data breakdown into ≤64 byte segments with complete headers
  • Three-Way Handshake: SYN → SYN-ACK → ACK connection establishment
  • Sliding Window: Multiple segment transmission with automatic retransmission
  • Heartbeat System: 1-second client heartbeat with 60-second server timeout