From 65d137348f400d37fb95b4d4076de145f5a22bff Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 21 Oct 2024 12:53:03 +0200 Subject: Moved common.c to common.h - fixed bug(server.c): `on` not being 32 bytes - cleanup --- send.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'send.c') diff --git a/send.c b/send.c index 693321e..cea4c2d 100644 --- a/send.c +++ b/send.c @@ -26,8 +26,6 @@ void timestamp(char timestamp[MESSAGE_TIMESTAMP_LEN]) strftime(timestamp, MESSAGE_TIMESTAMP_LEN, "%H:%M:%S", ltime); } - - int main(void) { serverfd = socket(AF_INET, SOCK_STREAM, 0); @@ -45,15 +43,13 @@ int main(void) struct message input = { .author = "Friendship", - .timestamp = "" }; - input.text = "HII!!"; + input.text = "Hello from send"; input.len = str_len(input.text); + printf("input.len: %d\n", input.len); timestamp(input.timestamp); send_message(input, serverfd); - // send_message(input); - // send_message(input); return 0; } -- cgit v1.2.3