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