How y4g2s7/proyecto1mypchat works
Proyecto1MyPChat is a console-based, multi-user chat with a C# client and a concurrent C TCP server. The main workflow is: a user connects and identifies, issues chat or room commands, the client encodes newline-delimited JSON, and the server dispatches requests and sends replies or broadcasts. The client also supports status changes, user lists, private/public messages, room creation, invitations, joining, room lists/messages, leaving, and disconnecting. Server internals beyond the supplied excerpts are represented only where the tree or excerpts support them.
Main entry points: ControladorCliente.cs Client controller · SocketServidor.c Server sockets · SocketCliente.cs Client socket · IndicacionesCliente.cs Command mapping
Components 14
Console client
- Client entry
CLIENTE/Cliente/Controlador/Cliente.cs - Client controller
CLIENTE/Cliente/Controlador/ControladorCliente.cs - Console view
CLIENTE/Cliente/Vista/VistaConsola.cs - Command mapping
CLIENTE/Cliente/Controlador/IndicacionesCliente.cs - Client socket
CLIENTE/Cliente/Modelo/SocketCliente.cs
Message protocol
- JSON builder
CLIENTE/Cliente/Modelo/ConstruccionJson.cs - JSON reader
CLIENTE/Cliente/Modelo/LecturaJson.cs - JSON formatting
SERVIDOR/Servidor/TiposDeJson.c
Server runtime
- Server sockets
SERVIDOR/Servidor/SocketServidor.c - Request dispatch
SERVIDOR/Servidor/IndicacionesServidor.c
Chat state
- User registry
SERVIDOR/Servidor/ListaDeUsuarios.c - Room state
SERVIDOR/Servidor/Salas.c
Other components
- Chat user
- TCP clients
Connections 21
- Chat user → Client entry: starts
- Client entry → Client controller: starts
- Client controller → Console view: prompts/displays
- Client controller → Command mapping: maps commands
- Command mapping → Console view: reads details
- Command mapping → JSON builder: builds requests
- Client controller → Client socket: connects/sends
- Command mapping → Client socket: sends user lists
- Client socket → TCP clients: opens TCP
- TCP clients → Server sockets: carries messages
- Server sockets → Request dispatch: dispatches requests
- Request dispatch → User registry: reads/updates users
- Request dispatch → Room state: manages rooms
- Request dispatch → JSON formatting: formats replies
- Server sockets → JSON formatting: formats invalid reply
- Server sockets → Client socket: returns replies
- Client socket → Client controller: emits messages
- Client controller → JSON reader: parses responses
- Client controller → Console view: shows translated replies
- Server sockets → User registry: cleans up disconnects
- Server sockets → Room state: cleans up memberships