blob: 039367d83ba97862fb2344619f21ff37f7a0fd5b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#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
// 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];
};
|