snipplets.dev/code/C/rest_server/main.c

27 lines
514 B
C

#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;
}