Overlapped I/O

Overlapped I/O is a name used for asynchronous I/O in the Windows API. It was introduced as an extension to the API in Windows NT.

Utilizing overlapped I/O requires passing an OVERLAPPED structure to API functions that normally block, including ReadFile(), WriteFile(), and Winsock's WSASend() and WSARecv(). The requested operation is initiated by a function call which returns immediately, and is completed by the OS in the background. The caller may optionally specify a Win32 event handle to be raised when the operation completes. Alternatively, a program may receive notification of an event via an I/O completion port, which is the preferred method of receiving notification when used in symmetric multiprocessing environments or when handling I/O on a large number of files or sockets. The so-called overlapped API presents some differences depending on the Windows version used.[1]

Asynchronous I/O is particularly useful for sockets and pipes.

Unix and Linux implement the POSIX asynchronous I/O API (AIO).

References


This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.