diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-02-02 09:29:10 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-02-02 09:29:10 +0800 |
commit | 12cde42c929b63a1ef1b2ad7f3482336419980b2 (patch) | |
tree | 3c7e7185909432068985da6bb739bf34d67fcd58 /rtclient/typedefs.h | |
parent | ebfa1718a36a8a0f3cf4571bc48b1990129af703 (diff) |
Asynchronous connection
Important updates:
1. Emscripten port.
2. HTTP request code copied from libicclient & slightly fixed.
3. Cookies, for maintaining authorisation between different async
handles.
Diffstat (limited to 'rtclient/typedefs.h')
-rw-r--r-- | rtclient/typedefs.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/rtclient/typedefs.h b/rtclient/typedefs.h new file mode 100644 index 0000000..e15b1df --- /dev/null +++ b/rtclient/typedefs.h @@ -0,0 +1,18 @@ +#ifndef RTCLIENT_TYPEDEFS_H +#define RTCLIENT_TYPEDEFS_H + +#include <stddef.h> +#ifdef __EMSCRIPTEN__ +#include <emscripten/fetch.h> +typedef emscripten_fetch_t rtclient_response; +#else +#include <curl/curl.h> +typedef struct { + void *userData; + char *data; + size_t numBytes; + CURL *curl; +} rtclient_response; +#endif + +#endif |