mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Make the automatic splice() mode's heuristics a service option
-s[N]:MIN,STREAK,SMALL sets where the automatic mode splices, as -g does for grace delay: a direction is spliced after STREAK reads in a row of MIN bytes or more (SMALL from a TLS socket), copied again after more than STREAK splices in a row of less than SMALL, and a body of known length is spliced if MIN or more of it is left. The defaults, 16384,2,4096, are what was built in; a value left out or 0 keeps its default. The man page describes it, and its HTML copy, which still said splice() was not built by default, now has the current text. A test case relays answers of every size, chunked ones and a 3 MB upload through every mode, two of them with heuristics set, and compares them byte for byte. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cfe52878d0
commit
61041ebe7d
7 files changed
+207
-32
No files matched your search
@@ -235,6 +235,11 @@ extern struct extparam confboot;
|
||||
#define SPLICE_DOWNLOAD 1
|
||||
#define SPLICE_UPLOAD 2
|
||||
#define SPLICE_AUTO 4
|
||||
/* where SPLICE_AUTO splices, by default (-s[N]:MIN,STREAK,SMALL): see
|
||||
sockmap.c */
|
||||
#define SPLICE_MIN 16384
|
||||
#define SPLICE_STREAK 2
|
||||
#define SPLICE_SMALL 4096
|
||||
int sockmap(struct clientparam * param, int timeo, int usesplice);
|
||||
int udpsockmap(struct clientparam * param, int timeo);
|
||||
int udpbind(struct clientparam * param);
|
||||
|
||||
Reference in new issue
Block a user