-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclients.h
More file actions
28 lines (24 loc) · 798 Bytes
/
Copy pathclients.h
File metadata and controls
28 lines (24 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef _CLIENTS_H
#define _CLIENTS_H
#define CLIENTS_MAX_EVENTS 128
#define CLIENTS_REQUEST_BUFFER_SIZE 4096
typedef struct clients clients_t;
struct clients
{
int nrequests;
int nrequests_started;
int nrequests_done;
int nclients;
int epollfd;
struct sockaddr_in server_addr;
char request_buffer[CLIENTS_REQUEST_BUFFER_SIZE];
size_t request_buffer_length;
size_t received_total;
mtime_t time_started;
mtime_t time_done;
struct client *client;
};
int clients_init(clients_t *, int, int, u_int32_t, u_int16_t, char *);
void clients_update(clients_t *);
int clients_loop(clients_t *);
#endif /* _CLIENTS_H */