Hi, folks
I'm trying to write a simple FTP proxy for Windows 9x. I've made 3 versions:
1. Version with WSAAsyncSelect notifications. It works slowly, since when I get FD_READ, I must wait in the WndProc until all data is sent.
Also windows messages are not very fast for network programming
2. Version with select() - it achieves relatively the same speed as Version 1, which is actually 2 times slower than without a proxy....
3. Version with overlapped I/O. Here is the big problem. First I noticed AcceptEx is not supported in Windows 9x - only in NT.
Second, after 2 days of debugging, I found a bug in MSAFD.DLL at address 7B412AF5 - it zeroes out the previously stored address of my callback completion routine (which is stored in WSAOVERLAPPED.OffsetHigh) and thus the next invoking of completion routine raises an Access Violation exception. I patched MSAFD.DLL with several NOPs, and then discovered another strange thing - sometimes when my completion routine (in WSARecv) is invoked, the parameter "dwError" contains value 103H, which is ERROR_NO_MORE_ITEMS.
I can not understand what this means. Please if someone knows anything about that to help me. I can post the source code, if needed.
Posted on 2001-09-13 05:04:45 by ivogelov