jdk/src/windows/native/sun/nio/ch/nio_util.h
changeset 5804 faf9bd47d6ce
parent 5506 202f599c92aa
child 7668 d4a77089c587
--- a/jdk/src/windows/native/sun/nio/ch/nio_util.h	Wed Jun 16 23:27:41 2010 -0700
+++ b/jdk/src/windows/native/sun/nio/ch/nio_util.h	Thu Jun 17 17:49:59 2010 +0100
@@ -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();