add config parser
This commit is contained in:
@@ -40,6 +40,12 @@ void cws_server_setup_hints(struct addrinfo *hints, size_t len, const char *host
|
||||
*/
|
||||
void cws_server_loop(int sockfd);
|
||||
|
||||
// @TODO
|
||||
/**
|
||||
* @brief Cleanup server's resources
|
||||
*/
|
||||
void cws_server_cleanup();
|
||||
|
||||
/**
|
||||
* @brief Adds a file descriptor to the interest list
|
||||
*
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
#define CWS_CONFIG_H
|
||||
|
||||
typedef struct cws_config_t {
|
||||
char *host;
|
||||
char *port;
|
||||
|
||||
char *cert;
|
||||
char *key;
|
||||
} cws_config;
|
||||
|
||||
cws_config *cws_config_init(void);
|
||||
void cws_config_free(cws_config *config);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user