How liu-jianhao/chatroom works
This repository is a learning project that evolves a TCP chat room through successive client and server implementations. The workflow progresses from connecting and exchanging messages to a Qt GUI client, a Reactor-based server, and finally an account-oriented client paired with a MySQL-enabled server. The README documents these capabilities; the sampled source confirms the early socket client/server, Qt socket behavior, and server entry points. The Reactor internals, account flow, and database operations were not sampled, so their internal wiring is left unspecified.
Main entry points: client.c Terminal client · server.c Basic chat server · tcpclient.cpp GUI chat client · main.cpp Logged server entry
Components 18
Socket Prototype
- Terminal client
dayOne/client.c - Basic chat server
dayOne/server.c
Qt Clients
- TCP demo client
dayTwo/communication/dialog.cpp - GUI chat client
dayThree/TcpClient/tcpclient.cpp - GUI entry point
dayThree/TcpClient/main.cpp
Reactor Servers
- Reactor entry point
dayFour/main.cpp - Reactor server
dayFour/MyReactor.cpp - Logged server entry
dayFive/main.cpp - Logged Reactor
dayFive/MyReactor.cpp - Server logging
dayFive/main.cpp
Account Chat
- Account client entry
daySix/ChatRoom/main.cpp - Sign-in interface
daySix/ChatRoom/sign.cpp - Chat interface
daySix/ChatRoom/chatroom.cpp - Qt chat transport
daySix/ChatRoom/tcpclient.cpp - MySQL chat server
daySix/Chat+mysql - Server Reactor
daySix/Chat+mysql/MyReactor.cpp
Other components
- Chat participant
- MySQL database
Connections 15
- Chat participant → Terminal client: enters chat text
- Terminal client → Basic chat server: sends TCP messages
- Basic chat server → Terminal client: returns chat messages
- Chat participant → TCP demo client: uses client
- Chat participant → GUI chat client: uses client
- GUI entry point → GUI chat client: creates window
- GUI chat client → Basic chat server: connects and exchanges data
- Reactor entry point → Reactor server: initializes and runs
- Logged server entry → Logged Reactor: initializes and runs
- Logged server entry → Server logging: logs lifecycle
- Account client entry → Sign-in interface: creates sign-in window
- Chat participant → Sign-in interface: uses account interface
- Chat participant → Chat interface: chats through GUI
- Qt chat transport → MySQL chat server: exchanges TCP data
- MySQL chat server → MySQL database: uses database