From dd68df08748b9fd6c8e849e6403459d444a8fb5f Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 27 Oct 2024 14:05:51 +0100 Subject: Added protocol Use a protocol defined in `README.md` and `chatty.h` for sending messages. Another big change is the clientsArena which now stores metadata for the connection such as the author's name. Misc: - Merged arena.h and common.h into chatty.h - removed all the unused code from arena.h as it was not very useful and would not win me any time. - Added compile_flag.txt - Changed formatting - Added more log messages - Added more asserts - Added bool type via enum --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 816705b..5922b01 100644 --- a/README.md +++ b/README.md @@ -18,20 +18,23 @@ The idea is the following: - [ ] ctrl+z to suspend ## server -- [ ] log messages to file (save history) - [ ] check if when sending and the client is offline (due to connection loss) what happens - [ ] timeout on recv? +- [ ] use threads to handle clients/ timeout when receiving because a client could theoretically + stall the entire server. ## common - [x] handle messages that are too large +- [ ] log messages to file (save history) - [ ] connect/disconnections messages - [ ] use IP address / domain - [ ] chat history +- [ ] asserting, logging if fail / halt execution ## Protocol -For now the protocol consists of sending Message type over the network, but in the future something -more flexible might be required. Because it will make it easier to do things like: -- request chat logs up to a certain point +- see `protocol.h` for more info +- [ ] make sections per message +- request chat logs from a certain point up to now (history) - connect to a specific room - connect/disconnect messages -- cgit v1.2.3