How isaacisaraloone/proyecto-1-chat-cliente-servidor works
This repository implements a concurrent TCP/IP instant-messaging client and server using newline-delimited JSON. The user workflow starts in the console client: it connects, identifies a username, sends commands, and displays server events. On the server, accepted connections are handled in per-client threads; the controller routes requests to shared user/room state and response or broadcast functions. The README documents private and public messaging, status and user listings, and room creation, invitations, membership, and chat. Source excerpts show the main client/server wiring; unsampled controller details are represented only where imports or documentation support the relationship.
Main entry points: Chat.cs Chat session · controlador.c Request controller · estado.c Users and rooms · main.c Server listener
Components 14
Console client
- Client entry
Cliente/program.cs - Chat session
Cliente/Chat.cs - Command handling
Cliente/AnalizarComando.cs - TCP connection
Cliente/ManejarConexion.cs
Server runtime
- Server listener
Servidor/src/main.c - Request controller
Servidor/src/controlador.c - Response broadcasts
Servidor/src/red.c
Shared chat state
- Users and rooms
Servidor/src/estado.c - State model
Servidor/include/estado.h - Hash collections
Servidor/lib/uthash/uthash.h
JSON protocol support
- JSON codec
Servidor/lib/cJSON.c - JSON API
Servidor/lib/cJSON.h
Other components
- Chat user
- TCP network
Connections 17
- Chat user → Client entry: starts
Cliente/program.cs - Client entry → Chat session: starts session
Cliente/program.cs - Chat session → TCP connection: connects and exchanges
Cliente/Chat.cs - Chat session → Command handling: processes commands
Cliente/Chat.cs - Chat session → Command handling: renders events
Cliente/Chat.cs - TCP connection → TCP network: sends and reads
README.md - TCP network → Server listener: TCP connects
README.md - Server listener → Users and rooms: initializes and destroys
Servidor/src/main.c - Server listener → Request controller: starts client thread
Servidor/src/main.c - Request controller → Users and rooms: routes state operations
Servidor/src/controlador.c - Request controller → Response broadcasts: dispatches responses
Servidor/src/controlador.c - Response broadcasts → Users and rooms: reads users and rooms
Servidor/src/red.c - Request controller → JSON API: uses JSON API
Servidor/src/controlador.c - Response broadcasts → JSON API: builds JSON messages
Servidor/src/red.c - JSON codec → JSON API: implements API
Servidor/lib/cJSON.c - State model → Hash collections: uses hash handles
Servidor/include/estado.h - Users and rooms → State model: implements state model
Servidor/src/estado.c