summaryrefslogtreecommitdiff
path: root/rtclient/typedefs.h
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-02-02 09:29:10 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-02-02 09:29:10 +0800
commit12cde42c929b63a1ef1b2ad7f3482336419980b2 (patch)
tree3c7e7185909432068985da6bb739bf34d67fcd58 /rtclient/typedefs.h
parentebfa1718a36a8a0f3cf4571bc48b1990129af703 (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.h18
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