… | |
… | |
1004 | |
1004 | |
1005 | # endif |
1005 | # endif |
1006 | |
1006 | |
1007 | #elif defined (_WIN32) |
1007 | #elif defined (_WIN32) |
1008 | /* does not work, just for documentation of what would need to be done */ |
1008 | /* does not work, just for documentation of what would need to be done */ |
|
|
1009 | /* actually, cannot be done like this, as TransmitFile changes the file offset, */ |
|
|
1010 | /* libeio guarantees that the file offset does not change, and windows */ |
|
|
1011 | /* has no way to get an independent handle to the same file description */ |
1009 | HANDLE h = TO_SOCKET (ifd); |
1012 | HANDLE h = TO_SOCKET (ifd); |
1010 | SetFilePointer (h, offset, 0, FILE_BEGIN); |
1013 | SetFilePointer (h, offset, 0, FILE_BEGIN); |
1011 | res = TransmitFile (TO_SOCKET (ofd), h, count, 0, 0, 0, 0); |
1014 | res = TransmitFile (TO_SOCKET (ofd), h, count, 0, 0, 0, 0); |
1012 | |
1015 | |
1013 | #else |
1016 | #else |