#ifndef _NET_H_ #define _NET_H_ #include "config.h" #include "request.h" #include "response.h" /** * Sends a `struct request` to the current `struct connection` contained within * `struct config *conf`. */ int send_request(struct config *conf, struct request *req); /** * Reads a response from the current `struct connection` and parses it into * `struct response *res` */ int read_response(struct config *conf, struct response *res); enum NetError { SSL_SEND_ERROR = -1, ALLOC_ERROR = -2, RESPONSE_PARSE_ERROR = -3, }; #endif