blob: af6bf572d029d0eb690e395f274b61c6c68d92cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#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
|