It works correctly with the wininet I'll commit later and a test app I wrote myself.
svn path=/trunk/; revision=33787
Handle, Socket->SharedData.NonBlocking));
return 0;
+ case FIONREAD:
+ return GetSocketInformation(Socket, AFD_INFO_RECEIVE_CONTENT_SIZE, (PULONG)lpvOutBuffer, NULL);
+
default:
*lpErrno = WSAEINVAL;
return SOCKET_ERROR;
InfoReq->Information.Ulong = 0;
break;
+ case AFD_INFO_RECEIVE_CONTENT_SIZE:
+ /* Only touch InfoReq if we actually have a valid connection.
+ Behaviour was verified under WinXP SP2. */
+ if(FCB->Connection.Handle)
+ InfoReq->Information.Ulong = FCB->Recv.Content - FCB->Recv.BytesUsed;
+
+ break;
+
default:
AFD_DbgPrint(MID_TRACE,("Unknown info id %x\n",
InfoReq->InformationClass));
#define AFD_INFO_RECEIVE_WINDOW_SIZE 0x06L
#define AFD_INFO_SEND_WINDOW_SIZE 0x07L
#define AFD_INFO_GROUP_ID_TYPE 0x10L
+#define AFD_INFO_RECEIVE_CONTENT_SIZE 0x11L
/* AFD Share Flags */
#define AFD_SHARE_UNIQUE 0x0L