Skip to content

Commit

Permalink
Increase pipe buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
EnderIce2 committed May 23, 2024
1 parent 81aa5d8 commit c23af83
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit c23af83

Please sign in to comment.