WriteFileGather() and ReadFileScatter() on SOCKET, PIPE, etc RRS feed

  • Question

  • Hi all,


    Can someone tell me if WriteFileGather() and ReadFileScatter() are supported on SOCKET, PIPE, etc.?


    Thanks in advance.

    Monday, June 11, 2007 1:15 AM

All replies

  • 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).

    Monday, June 11, 2007 7:28 PM