diff options
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(); |