How calixto-sxz/chat-sistemas-distribuidos works
This is a small Windows TCP chat application. A user starts the client, connects to the server, supplies a username, and exchanges messages; the server broadcasts chat and join/leave notices to connected clients and keeps message history in memory and in a local file. The main runtime is visible in both source files. Edges reflect calls and socket traffic shown in the excerpts; no README or further product capabilities were provided.
Main entry points: server.cpp Client handler · client.cpp Client app
Components 8
Chat client
- Client app
client.cpp - Message receiver
client.cpp
Chat server
- Connection listener
server.cpp - Client handler
server.cpp - Message broadcast
server.cpp
Message history
- In-memory history
server.cpp - History file
server.cpp
Other components
- Chat user
Connections 12
- Chat user → Client app: enters messages
client.cpp - Client app → Connection listener: connects via TCP
client.cpp - Connection listener → Client handler: dispatches client
server.cpp - Client app → Client handler: sends username and chat
client.cpp - Client handler → Message broadcast: broadcasts messages
server.cpp - Message broadcast → Message receiver: sends chat over TCP
server.cpp - Message receiver → Chat user: displays messages
client.cpp - Client handler → In-memory history: appends messages
server.cpp - Client handler → History file: saves messages
server.cpp - Connection listener → In-memory history: loads on startup
server.cpp - History file → In-memory history: reads saved lines
server.cpp - Client handler → In-memory history: sends prior history
server.cpp