Using ReadFile() and WriteFile() on Socket DescriptorsLast reviewed: November 2, 1995Article ID: Q104536 |
The information in this article applies to:
Socket handles for Windows NT sockets are object handles. For example, you can pass a socket handle in the appropriate state to the ReadFile(), ReadFileEx(), WriteFile(), or WriteFileEx() application programming interface (API) to receive and send data. The socket descriptor passed to the file APIs must be a connected, TCP descriptor. NOTE: There is no way to specify send and receive out-of-band data. To use a Windows Sockets handle, the ReadFile() and WriteFile() APIs must use asynchronous access. That is, you must specify the overlapped parameter in the call to ReadFile() and WriteFile(). This will allow you to be notified when the I/O has completed. This functionality is based upon the implementation of Windows Sockets and may not be available to all implementations. For example, although this works in the Win32 subsystem, it is not supported under Win32s.
|
Additional reference words: 3.10 3.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |