diff options
author | alanb <none@none> | 2010-06-17 17:49:59 +0100 |
---|---|---|
committer | alanb <none@none> | 2010-06-17 17:49:59 +0100 |
commit | 70b15e0ebbf9b3eaeb999e8419bb2a679617fab9 (patch) | |
tree | 2e71894256904ec8d83031be88d5ea225594252d /src/windows/native/sun/nio/ch/nio_util.h | |
parent | d9e5053acb1490c3ff60b46b033ca3de28755295 (diff) |
6395224: (so) SocketChannel writer blocked on large buffer is not preempted by close method (vista)
Reviewed-by: chegar
Diffstat (limited to 'src/windows/native/sun/nio/ch/nio_util.h')
-rw-r--r-- | src/windows/native/sun/nio/ch/nio_util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/windows/native/sun/nio/ch/nio_util.h b/src/windows/native/sun/nio/ch/nio_util.h index 9c7a6d958..963e93ef0 100644 --- a/src/windows/native/sun/nio/ch/nio_util.h +++ b/src/windows/native/sun/nio/ch/nio_util.h @@ -25,6 +25,14 @@ #include "jni.h" +/** + * The maximum buffer size for WSASend/WSARecv. Microsoft recommendation for + * blocking operations is to use buffers no larger than 64k. We need the + * maximum to be less than 128k to support asynchronous close on Windows + * Server 2003 and newer editions of Windows. + */ +#define MAX_BUFFER_SIZE ((128*1024)-1) + jint fdval(JNIEnv *env, jobject fdo); jlong handleval(JNIEnv *env, jobject fdo); jboolean isNT(); |