This commit is contained in:
cdricms
2024-11-20 18:29:11 +01:00
parent cdae291dd8
commit e24c207bdc
4 changed files with 42 additions and 32 deletions

View File

@@ -22,15 +22,16 @@ typedef enum {
HTTP_SRS_HANDLE_REQUEST_FAILED,
HTTP_SRS_FORK_FAILED,
HTTP_SRS_WONT_HANDLE,
HTTP_SRS_FILE_NOT_FOUND,
} HttpServerRunStatus;
// Structure ayant pour objectif de stocker tout ce qui est nécessaire au bon
// fonctionnement du serveur.
typedef struct {
int port; // Port du host
int server_fd; // File descriptor du server
unsigned int backlog; // Le nombre de clients possibles pouvant être en
// attente.
int port; // Port du host
int server_fd; // File descriptor du server
unsigned int
backlog; // Le nombre de clients possibles pouvant être en attente.
struct sockaddr_in *address; // L'adresse décrivant une socket internet.
pid_t pid; // Le pid du parent en attente de requêtes.
} HttpServer;