How neshgp04/proyecto1-so works
Proyecto1-SO is a multithreaded TCP chat implementation with a command-line client and a server. The intended workflow is client connection and registration, command exchange, server parsing and handling, and replies or message delivery. The README describes important server capabilities, but also marks protocol parsing, registration, and most command handlers as pending or temporary. Edges reflect shown calls or documented behavior; where server startup wiring is not shown, links are omitted or marked unverified.
Main entry points: main_client.c Connect and register · client_thread.c Client worker · input_loop.c Command input · handlers.c Command handlers
Components 20
Chat client
- Connect and register
src/client/main_client.c - Command input
src/client/input_loop.c - Local commands
src/client/commands_local.c - Response receiver
src/client/receiver_loop.c - Terminal UI
src/client/ui.c - Client interface
include/client.h
Chat server
- Server startup
src/server/main_server.c - Connection acceptor
src/server/accept_loop.c - Client worker
src/server/client_thread.c - Command handlers
src/server/handlers.c - Inactivity monitor
src/server/inactivity.c - Server interface
include/server.h
Protocol and validation
- Message parser
src/common/protocol.c - Wire protocol
include/protocol.h - Parser interface
include/parser.h - Input validation
src/common/validation.c - Shared constants
include/common.h
Session management
- Session definition
include/session.h - Session registry
src/server/session_manager.c
Other components
- Chat user
Connections 22
- Chat user → Connect and register: starts client
src/client/main_client.c - Connect and register → Server startup: connects TCP
README.md - Connect and register → Command input: starts input
src/client/main_client.c - Connect and register → Response receiver: starts receiver
src/client/main_client.c - Chat user → Command input: enters commands
- Command input → Local commands: runs help
- Command input → Server startup: sends commands
src/client/input_loop.c - Server startup → Connection acceptor: accepts clients
- Connection acceptor → Client worker: spawns worker
README.md - Client worker → Message parser: parses messages
src/server/client_thread.c - Client worker → Command handlers: dispatches parsed
src/server/client_thread.c - Command handlers → Session registry: looks up sessions
src/server/handlers.c - Command handlers → Message parser: builds replies
src/server/handlers.c - Command handlers → Input validation: validates input
src/server/handlers.c - Client worker → Session registry: cleans session
src/server/client_thread.c - Inactivity monitor → Session registry: marks inactive
README.md - Response receiver → Terminal UI: displays replies
- Command input → Wire protocol: formats commands
src/client/input_loop.c - Message parser → Parser interface: implements parsing
src/common/protocol.c - Connect and register → Client interface: uses interface
src/client/main_client.c - Client worker → Server interface: uses interface
src/server/client_thread.c - Session registry → Session definition: stores sessions
src/server/session_manager.c