thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeking3 <...@git.apache.org>
Subject [GitHub] thrift pull request #1402: THRIFT-4372 Pipe write operations across a networ...
Date Thu, 26 Oct 2017 15:50:07 GMT
Github user jeking3 commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1402#discussion_r147185494
  
    --- Diff: lib/csharp/src/Transport/TNamedPipeServerTransport.cs ---
    @@ -239,40 +239,51 @@ public override void Write(byte[] buf, int off, int len)
                         throw new TTransportException(TTransportException.ExceptionType.NotOpen);
                     }
     
    -                if (asyncMode)
    +                // if necessary, send the data in chunks
    +                // there's a system limit around 0x10000 bytes that we hit otherwise
    +                // MSDN: "Pipe write operations across a network are limited to 65,535
bytes per write. For more information regarding pipes, see the Remarks section."
    +                var nBytes = Math.Min(len, 15 * 4096);  // 16 would exceed the limit
    --- End diff --
    
    Why not actually use (2^16)-1 which is the limit?


---

Mime
View raw message