<commit_before>#ifndef _SERVER_H
#define _SERVER_H
#include <time.h>
#include <sys/epoll.h>
#include "list.h"
#include "threadpool.h"
int open_listenfd(int port);
void* check_connections(void* data);

struct http_socket {
    int fd;
    /*struct pollfd* poll_fd;*/
    struct epoll_event event;
    char* read_buffer;
    int read_buffer_size;
    time_t last_access;
    struct list_elem elem;
};

struct future_elem {
    struct future* future;
    struct list_elem elem;
};
#endif

<commit_msg>Define functions for polling of sockets.<commit_after>#ifndef _SERVER_H
#define _SERVER_H
#include <time.h>
#include <sys/epoll.h>
#include "list.h"
#include "threadpool.h"
struct http_socket;

int open_listenfd(int port);
void* check_connections(void* data);
int watch_read(struct http_socket* http);
int watch_write(struct http_socket* http);
int destroy_socket(struct http_socket* http);

struct http_socket {
    int fd;
    /*struct pollfd* poll_fd;*/
    struct epoll_event event;
    char* read_buffer;
    int read_buffer_size;
    time_t last_access;
    struct list_elem elem;
};

struct future_elem {
    struct future* future;
    struct list_elem elem;
};
#endif


{'fraction_non_alphanumeric': 0.10212765957446808, 'fraction_numerical': 0.0, 'mean_word_length': 4.4953271028037385, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '992980', 'n_tokens_mistral': 409, 'n_tokens_neox': 402, 'n_words': 111}