A socket-based messaging system implementing a custom communication protocol for real-time messaging between clients and servers.
- Real-time messaging: Send and receive messages through socket connections
- Multi-threaded architecture: Concurrent handling of multiple clients
- Custom encoding: C-based encoding/decoding functions for data processing
- Heartbeat monitoring: Automatic client health checking and timeout handling
- Database persistence: Message storage and retrieval system
- Cross-platform support: Works on Linux and Windows systems
The system consists of three main components:
- server.py: Main server application handling client connections, authentication, and message routing
- db.py: Database operations for message storage and retrieval
- c16.py: Python wrapper for C encoding/decoding functions
- 16.c: C library providing encoding/decoding functionality
- comms.py: Client application for connecting to server and sending/receiving messages
- db.py: Client-side database operations (shared with server)
- c16 components/: Compiled C libraries for encoding/decoding operations
The system uses multiple ports for different communication types:
- Port 10740: Main client connection and heartbeat
- Port 9281: Authentication handshake
- Port 12090: Server authentication callback
- Port 8070: Heartbeat monitoring
- Port 6090: Message delivery (server to client)
- Port 9980: Message sending (client to server)
-
Start the server:
cd src/Server python server.py -
Connect a client:
cd src/Client python comms.py -
Start sending messages through the interactive prompt
For detailed information, see the comprehensive documentation in the docs folder:
- Installation Guide - Complete setup instructions for all platforms
- Basics - Getting started guide and basic usage
- Troubleshooting Guide - Solutions to common issues
- Architecture Overview - System design and component interactions
- Protocol Specification - Detailed communication protocol
- API Reference - Complete function and class documentation
- Development Guide - Development workflows and best practices
- Security Guide - Security considerations and hardening
- Performance Guide - Optimization and scalability strategies
- Documentation - Legacy development guidelines