Platform SDK: Windows Sockets |
A socket handle can optionally be a file handle in Windows Sockets 2. It is possible to use socket handles with ReadFile, WriteFile, ReadFileEx, WriteFileEx, DuplicateHandle, and other Win32 functions. Not all transport service providers will support this option. However, for an application to run over the widest possible number of service providers, it should not assume that socket handles are file handles.
Windows Sockets 2 has expanded certain functions that transfer data between sockets using handles. The functions offer advantages specific to sockets for transferring data and include WSARecv, WSASend, and WSADuplicateSocket.