7176630: (sc) SocketChannel.write does not write more than 128k when channel configured blocking [win]

Kurchi Subhra Hazra kurchi.subhra.hazra at oracle.com
Wed Jun 13 09:24:14 PDT 2012


Just out of curiosity - why are you doing multiple calls to WSASend as 
opposed to setting up
and sending multiple buffers with one call?

- Kurchi

On 6/13/12 9:01 AM, Wolfgang Baltes wrote:
> Looks ok to me.
> Wolfgang.
>
> On 2012-06-13 06:54, Alan Bateman wrote:
>>
>> I need a reviewer for a small change to the SocketChannel.write 
>> implementation on Windows. The issue on Windows is that we limit the 
>> buffer size to 128k-1 because asynchronous close doesn't work on 
>> Windows for sizes later than that (the long standing Microsoft 
>> recommendation is to use <=64k). The issue with limiting the size of 
>> the I/O operation is that the write method may return a value less 
>> than what is expected when the channel is configured blocking and 
>> this can cause problem for applications that don't check the return 
>> value. The changes just convert the large write into multiple calls 
>> to WSASend. The webrev with the changes is here:
>>
>> http://cr.openjdk.java.net/~alanb/7176630/webrev/
>>
>> Thanks,
>> Alan.
>>
>>
>
>



More information about the nio-dev mailing list