How bsoto-fc/proyecto-1-myp works
Xerces Chat is a desktop chat client paired with a C server. The main workflow is: a user connects with a username, the client identifies over TCP, then sends chat and room requests; the server authenticates and dispatches them, maintains users and rooms, and replies for the client to update its UI state. The README establishes the client/server product; sampled Kotlin and server entry-point code support the main connections. Server-side room and user internals are represented by their exact source paths, but their detailed dispatch wiring was not sampled.
Main entry points: App.kt Screen manager · server.c Connection server · SocketClient.kt TCP client · users.c User handling
Components 15
Desktop client
- Chat UI
gui/app/src/main/kotlin/mx/unam/ciencias/myp/ChatScreen.kt - Connection UI
gui/app/src/main/kotlin/mx/unam/ciencias/myp/ConnectionWindow.kt - Screen manager
gui/app/src/main/kotlin/mx/unam/ciencias/myp/App.kt - TCP client
gui/app/src/main/kotlin/mx/unam/ciencias/myp/sockets/SocketClient.kt - Message codec
gui/app/src/main/kotlin/mx/unam/ciencias/myp/messages/Message.kt
Chat server
- Server entry
server/src/main.c - Connection server
server/src/server.c - Socket utilities
server/util/socketutil.c - JSON utilities
server/util/jsonutil.c
Chat state
- User handling
server/src/users.c - User registry
server/include/users.h - Room handling
server/src/rooms.c - Room registry
server/include/rooms.h
Other components
- Chat user
- Chat server
Connections 18
- Chat user → Connection UI: enters connection
- Chat user → Chat UI: uses chat
- Connection UI → Screen manager: submits details
- Screen manager → TCP client: connects
- Screen manager → Message codec: encodes requests
- TCP client → Chat server: identifies and exchanges JSON
- Chat server → TCP client: returns responses
- TCP client → Screen manager: delivers messages
- Screen manager → Message codec: decodes messages
- Screen manager → Chat UI: updates chat state
- Server entry → Connection server: starts server
- Connection server → Socket utilities: creates and accepts sockets
- Chat server → Connection server: opens TCP connection
- Connection server → JSON utilities: uses JSON parsing
- Connection server → User handling: authenticates and dispatches
- Connection server → User handling: disconnects user
- User handling → User registry: reads and updates
- Room handling → Room registry: reads and updates