Hi, My name is Dongwan Kim.
I found the misbehavior of WSARecv/WSASend when they are called multiple times for overlapped I/O to the same socket .
Specifically, the problem occurs if WSARecv is called when overlapped I/O gets ready. WSARecv intercepts the message from the socket.
for example,
Alice Bob WSARecv( SOCKET_A, buffer1 ) ; <----- X ... <----- Y WSARecv(SOCKET_A, buffer2) ;
Bob sent messages( X , Y ) to Alice. Alice should get X to buffer1, Y to buffer 2 respectively.
But, In the current version of wine , Alice could get Y to buffer 1 because WSARecv always tries to get message from the socket without checking if there are waiting syncs.
I attached my solution and the programs for testing.
The test server program receives messages from client with WSARecv. you can run it as : test_server.exe 9088 9088 is port number which is hard-coded in test client program...
The test client program sends fragments of a file to server. you can run it as : test_client.exe localhost [file_to_send] I tested with a 96MB file.
The programs are not clean...
If you need, I can send the source code.
Thanks.
Best Regards.