#ifndef SOCKETS_H #define SOCKETS_H #define _POSIX_C_SOURCE 200809L #include #include #include #include #include #include #include "errors.h" #define PORT 8080 #define MAX_PEND_REQ 5 int createSocket(); void setSockOptions(int fd); void setSockAddress(int argc, char *argv[], struct sockaddr_in * address, in_addr_t inAddress); int bindAndGetSocket(int fd, struct sockaddr_in *address); void connectToSocket(int fd, struct sockaddr_in *address); void closeSocket(int fd); #endif