diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-10-21 12:53:03 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-10-21 12:54:31 +0200 |
commit | 65d137348f400d37fb95b4d4076de145f5a22bff (patch) | |
tree | b2738de9e6c04a9576066f721b46a9ba985e6aee /send.c | |
parent | c616e09df8783a4f850f38f0b79b5029e781f932 (diff) |
Moved common.c to common.h
- fixed bug(server.c): `on` not being 32 bytes
- cleanup
Diffstat (limited to 'send.c')
-rw-r--r-- | send.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -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; } |