27 lines
471 B
C
27 lines
471 B
C
#ifndef HTTP_H
|
|
#define HTTP_H
|
|
|
|
#include <netinet/in.h>
|
|
#include <sys/socket.h>
|
|
|
|
typedef struct {
|
|
int client_sock;
|
|
char *method;
|
|
char *target;
|
|
char *version;
|
|
/* Field_Lines (Header) */
|
|
char *body;
|
|
} HTTP_Request;
|
|
|
|
typedef struct {
|
|
char *version;
|
|
unsigned int status;
|
|
/* Field_Lines (Header) */
|
|
char *body;
|
|
} HTTP_Response;
|
|
|
|
int http_init(int port, int connection_amount);
|
|
HTTP_Request* http_accept(int server);
|
|
|
|
#endif /* HTTP_H */
|