summaryrefslogtreecommitdiffstats
path: root/src/core.h
diff options
context:
space:
mode:
authortiptorrent development team <tiptorrent@soleta.eu>2021-09-23 22:05:20 +0200
committertiptorrent development team <tiptorrent@soleta.eu>2021-09-29 15:49:11 +0200
commit324fdcfd583dbd95ce479712be57c6ca93c29fbb (patch)
tree472f5b4c00587ed8cd49d8987c806100ab5acb1b /src/core.h
parente39f7f8e3c940cb6e6fd23e99f03017bb5865114 (diff)
runtime split original file into chunks
No need to split the original file on the server side.
Diffstat (limited to 'src/core.h')
-rw-r--r--src/core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core.h b/src/core.h
index 36fb205..0a82d2e 100644
--- a/src/core.h
+++ b/src/core.h
@@ -6,6 +6,8 @@
#include <stdbool.h>
#include <netinet/in.h>
+#define MAX_CHUNKS 4
+
#define TIP_MSG_REQUEST_MAXLEN 131072
extern const char *root;
@@ -48,7 +50,9 @@ struct tip_client {
enum tip_http_method method;
const char *uri;
const char *path;
+ uint32_t chunk;
off_t size;
+ off_t left;
int fd;
off_t offset;