Browse Source

fix buffer size

tags/3.0
Gang Zhuo 9 years ago
parent
commit
ca8df1b51f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      shadowsocks-csharp/Controller/Service/TCPRelay.cs

+ 1
- 1
shadowsocks-csharp/Controller/Service/TCPRelay.cs View File

@@ -93,7 +93,7 @@ namespace Shadowsocks.Controller
private int _firstPacketLength;
// Size of receive buffer.
public const int RecvSize = 8192;
public const int BufferSize = RecvSize + 32;
public const int BufferSize = RecvSize + (RecvSize / IVEncryptor.CRC_BUF_LEN + 1) * IVEncryptor.CRC_BYTES + 48;
private int totalRead = 0;
private int totalWrite = 0;


Loading…
Cancel
Save