mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-28 07:59:41 +08:00
Relays: the size of a splice() pipe given to a service, -b,SIZE
-b, which made a service read less at once into a connection's buffer, takes the size of its pipes after a comma: -b,262144, -b8192,32768. From 4096 to 64M (MAXPIPESIZE); a pipe the system will not make so large (pipe-max-size for an unprivileged process) is not used, and the data is copied, as with -DPIPESIZE, which stays the default for a service given none. sockmap() and the callbacks' relay fill a pipe up to the service's size (SRVPIPESIZE()), and only a pipe of other than 64K costs an fcntl() as it is made. The man page tells of -b, which it did not before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
add40b1d85
commit
a6402010a4
6 files changed
+44
-21
No files matched your search
@@ -400,7 +400,16 @@ static int srvprepare(struct srvstart *s, int argc, char **argv){
|
||||
srv->family = atoi(argv[i]+1);
|
||||
break;
|
||||
case 'b':
|
||||
/* -b[SIZE][,PIPESIZE] */
|
||||
srv->bufsize = atoi(argv[i]+2);
|
||||
#ifdef WITHSPLICE
|
||||
if(strchr(argv[i]+2, ',')){
|
||||
long n = atol(strchr(argv[i]+2, ',') + 1);
|
||||
|
||||
if(n < 4096 || n > MAXPIPESIZE) error = 1;
|
||||
else srv->pipesize = (unsigned)n;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
#ifdef STDMAIN
|
||||
#ifndef _WIN32
|
||||
|
||||
Reference in new issue
Block a user