diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-10-19 15:31:51 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-10-19 15:31:51 +0200 |
commit | ff0aae89238f4d60267def24476e8b9f4cb596cf (patch) | |
tree | d8a646d04c0e2617bf279b387e5d11960906d340 /config.h | |
parent | 104dabefd62952f2d892a2dcdfb5700d9379ac00 (diff) |
add serialization to file code
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 19 |
1 files changed, 5 insertions, 14 deletions
@@ -1,20 +1,11 @@ -#include <stdarg.h> -#include <stdio.h> -#include <unistd.h> - #define PORT 9983 // max size for a message sent #define BUF_MAX 255 // max length of messages #define MSG_MAX 256 +// max length of author field +#define MSG_AUTHOR_LEN 12 +// max length of timestamp field +#define MSG_TIMESTAMP_LEN 9 // current user's name -#define USERNAME "unrtdqttr" - -void writef(char* format, ...); - -struct message { - char buf[MSG_MAX]; - int buf_len; - char timestamp[9]; // HH:MM:SS - char author[12]; -}; +#define USERNAME "Jef Koek" |