WriteFileGather() and ReadFileScatter() on SOCKET, PIPE, etc
Hi all,
Can someone tell me if WriteFileGather() and ReadFileScatter() are supported on SOCKET, PIPE, etc.?
Thanks in advance.
Hi all,
Can someone tell me if WriteFileGather() and ReadFileScatter() are supported on SOCKET, PIPE, etc.?
Thanks in advance.
I do not know if WriteFileGather()/ReadFileScatter() are supported on sockets and pipes. Support for passing a socket handle to WriteFileGather()/ReadFileScatter() is not documented so this may not be the best long term strategy for doing scatter/gather IO using sockets. Even if using a socket handle works now it is possible it will not work in certain situations or in future version of Windows.
Winsock does support scatter/gather IO using WSASend , WSASendTo, WSARecv, and WSARecvFrom. So unless your code needs to work on sockets, pipes and files the Winsock APIs are the fully documented way to do scatter/gather IO via sockets. If your code needs to treat files, pipes and sockets in an identical manner you should post this question to the Windows Networking newsgroup (http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.win32.programmer.networks).