You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

TCPInfo.cs 704 B

1234567891011121314151617181920
  1. using Shadowsocks.Net.Crypto.AEAD;
  2. namespace Shadowsocks.Net.Crypto
  3. {
  4. public static class TCPParameter
  5. {
  6. // each recv size.
  7. public const int RecvSize = 2048;
  8. // overhead of one chunk, reserved for AEAD ciphers
  9. // /* two tags */
  10. public const int ChunkOverheadSize = 16 * 2 + AEADCrypto.ChunkLengthBytes;
  11. // max chunk size
  12. public const uint MaxChunkSize = AEADCrypto.ChunkLengthMask + AEADCrypto.ChunkLengthBytes + 16 * 2;
  13. // In general, the ciphertext length, we should take overhead into account
  14. public const int BufferSize = RecvSize + (int)MaxChunkSize + 32 /* max salt len */;
  15. }
  16. }