refactor: simplify file name
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef CWS_COLORS_H
|
||||
#define CWS_COLORS_H
|
||||
#ifndef CWS_DEBUG_H
|
||||
#define CWS_DEBUG_H
|
||||
|
||||
/* ANSI color escape sequences */
|
||||
#define RED "\033[31m"
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
#ifndef CWS_UTILS_H
|
||||
#define CWS_UTILS_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <sys/socket.h>
|
||||
#ifndef CWS_ERROR_H
|
||||
#define CWS_ERROR_H
|
||||
|
||||
typedef enum cws_server_ret {
|
||||
CWS_SERVER_OK,
|
||||
@@ -29,8 +26,4 @@ typedef enum cws_server_ret {
|
||||
CWS_SERVER_WORKER_ERROR,
|
||||
} cws_server_ret;
|
||||
|
||||
cws_server_ret cws_fd_set_nonblocking(int sockfd);
|
||||
|
||||
void cws_utils_get_client_ip(struct sockaddr_storage *sa, char *ip);
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef CWS_HASH_UTILS_H
|
||||
#define CWS_HASH_UTILS_H
|
||||
#ifndef CWS_HASH_H
|
||||
#define CWS_HASH_H
|
||||
|
||||
unsigned int my_str_hash_fn(const void *key);
|
||||
|
||||
13
include/utils/net.h
Normal file
13
include/utils/net.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef CWS_NET_H
|
||||
#define CWS_NET_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "utils/error.h"
|
||||
|
||||
cws_server_ret cws_fd_set_nonblocking(int sockfd);
|
||||
|
||||
void cws_utils_get_client_ip(struct sockaddr_storage *sa, char *ip);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user