update C snipplets

This commit is contained in:
2024-04-27 23:54:46 +03:00
parent 42d18ccae1
commit f2b20118e0
59 changed files with 589 additions and 831 deletions

View File

@@ -0,0 +1,26 @@
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <pthread.h>
#include <ulfius.h>
#include <stdatomic.h>
#include "utils.h"
#include "server.h"
int main(int argc, char **argv) {
// создаём отдельный поток, в котором запускаем сервер
pthread_t tid;
pthread_create(&tid, NULL, thread_server, (void *)&tid);
// while (true) {
// }
pthread_exit(NULL);
return 0;
}