blob: 7cf6b5eff68f046716c61c71eed8e1c124362a6c (
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
25
26
27
|
#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 net_write_data {
char *buffer;
size_t size;
};
struct net_file_write_data {
FILE *file;
};
int net_init();
void net_shutdown();
int net_send_request(char *url, int write_opts, void *userdata);
int net_download(const char *url, const char *dst);
#endif
|