summaryrefslogtreecommitdiff
path: root/include/net.h
blob: e6cb32a253d8ec873678b294abbfda2f42203d75 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef NET_H
#define NET_H

#include <stddef.h>
#include <stdio.h>

#define WRITE_OPT_MEMORY    1
#define WRITE_OPT_FILE      2

typedef struct string_view string_view;

struct memory {
    char *buffer;
    size_t size;
};

struct net_fwrite_userdata {
    FILE *file;
};

int net_init();
void net_shutdown();

int net_send_request(char *url, struct memory *mem, int write_opts);

#endif