From c23af8300cb154e5e82daac99db24c9844f81a9c Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Thu, 23 May 2024 06:00:45 +0300 Subject: [PATCH] Increase pipe buffer --- bridge.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bridge.c b/bridge.c index 56086da..dc5ef84 100644 --- a/bridge.c +++ b/bridge.c @@ -43,6 +43,8 @@ __attribute__((__always_inline__, __gnu_inline__)) #define naked __attribute__((naked)) +#define BUFFER_LENGTH 2048 + typedef unsigned short sa_family_t; typedef char *caddr_t; typedef unsigned socklen_t; @@ -322,7 +324,7 @@ void PipeBufferInThread(LPVOID lpParam) int EOFCount = 0; while (TRUE) { - char buffer[1024]; + char buffer[BUFFER_LENGTH]; int read = sys_read(bt->fd, buffer, sizeof(buffer)); if (unlikely(read < 0)) @@ -417,7 +419,7 @@ void PipeBufferOutThread(LPVOID lpParam) bt->fd, bt->hPipe); while (TRUE) { - char buffer[1024]; + char buffer[BUFFER_LENGTH]; DWORD dwRead; if (unlikely(!ReadFile(bt->hPipe, buffer, sizeof(buffer),