Updated project structure and makefile. Started creating frontend. Created csv database interphase
This commit is contained in:
8
include/netw_op/netw.h
Normal file
8
include/netw_op/netw.h
Normal 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
20
include/netw_op/request.h
Normal 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);
|
Reference in New Issue
Block a user