libpolluxd/px_config.h
ingrix 669e05d2ab Substantial changes, addition of url lexer
This changes the api for classes to have _destroy and _delete functions
for each.  The former cleans up the class, the latter calls _destroy()
and then executes a free() on it.

This adds a uri lexer to split uris into their component parts for use
in gemini requests.

Adds a px_connection class that represents a connection between a server
and a client.

This also revises px_gemini_* classes and moves message handling to
their respective functions.
2024-04-01 18:29:13 -07:00

20 lines
513 B
C

#ifndef PX_CONFIG_H__
#define PX_CONFIG_H__
struct px_server_config_ {
// all of these are owned by the config object
char* listen_addr;
char* listen_port;
char* cert_file;
char* pk_file;
};
typedef struct px_server_config_ px_server_config_t;
void px_server_config_init(px_server_config_t* conf);
void px_server_config_destroy(px_server_config_t* cfg);
void px_server_config_delete(px_server_config_t* cfg);
px_server_config_t* px_server_config_from_file(char const* path);
#endif // PX_CONFIG_H__