From f6eef73f7f0e805811bb9c2d748c17d558615a74 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 21 Oct 2024 00:11:27 +0200 Subject: Added README.md --- README.md | 37 +++++++++++++++++++++++++++++++++++++ client.c | 5 ----- server.c | 24 ------------------------ 3 files changed, 37 insertions(+), 29 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..2b02f02 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# Chatty +- use memory arena's to manage memory + +# Server +The idea is the following: +- tcp server that you can send messages to +- encrypted communication +- history upon connecting +- date of messages sent +- author +- fingeprint as ID for authorship +- client for reading the messages and sending them at the same time + +- min height & width +- wrapping input +- max y for new messages and make them scroll +- check resize event +- asynchronously receive/send a message +- fix receiving messages with arbitrary text length + +## TODO: send message to all other clients +- implement different rooms +- implement history + - [ ] fix server copying the bytes correctly +- implement tls + + +# Client +- bug: when having multiple messages and resizing a lot, the output will be in shambles +- bug: when resizing afters sending messages over network it crashes +- use pointer for add_message +- validation of sent/received messages +- handle disconnection + +# Questions +- will two consecutive sends be read in one recv +- can you recv a message in two messages diff --git a/client.c b/client.c index b9d96d3..cf60853 100644 --- a/client.c +++ b/client.c @@ -1,10 +1,5 @@ // Client for chatty -// TODO: -// - bug: when having multiple messages and resizing a lot, the output will be in shambles -// - bug: when resizing afters sending messages over network it crashes -// - use pointer for add_message - // clang-format off #define TB_IMPL #include "termbox2.h" diff --git a/server.c b/server.c index 06a26b3..7617dfc 100644 --- a/server.c +++ b/server.c @@ -1,28 +1,4 @@ // Server for chatty - -// The idea is the following: -// - tcp server that you can send messages to -// - encrypted communication -// - history upon connecting -// - date of messages sent -// - author -// - fingeprint as ID for authorship -// - client for reading the messages and sending them at the same time - -// TODO: -// - min height & width -// - wrapping input -// - max y for new messages and make them scroll -// - check resize event -// - asynchronously receive/send a message -// - fix receiving messages with arbitrary text length - -// TODO: send message to all other clients -// - implement different rooms -// - implement history -// - [ ] fix server copying the bytes correctly -// - implement tls - #include "common.h" #include #include -- cgit v1.2.3