Updated project structure and makefile. Started creating frontend. Created csv database interphase

This commit is contained in:
2020-06-30 12:39:50 +05:00
parent 457a52a585
commit db9b46f041
28 changed files with 643 additions and 89 deletions

8
include/netw_op/netw.h Normal file
View File

@@ -0,0 +1,8 @@
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <netdb.h>
int get_listener_socket(char *port);
void *get_in_addr(struct sockaddr *sa);

20
include/netw_op/request.h Normal file
View File

@@ -0,0 +1,20 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
struct header_s {
char * str;
size_t size;
};
char *get_path(char *request);
struct header_s *gen_header(int status_code, size_t file_size, char *mime_type);
int send_response(int fd, char *req_path);
void handle_post_request(int fd, char *request);
void handle_get_request(int fd, char *request);