afd: use SetFileCompletionNotificationModes on driver sockets

This should slightly improve performance.
This commit is contained in:
Bert Belder 2018-06-04 23:10:18 -07:00
parent 44f357ab2e
commit 6e50accebe
No known key found for this signature in database
GPG Key ID: 7A77887B2E2ED461

View File

@ -111,6 +111,10 @@ int afd_create_driver_socket(HANDLE iocp, SOCKET* driver_socket_out) {
if (CreateIoCompletionPort((HANDLE) socket, iocp, 0, 0) == NULL)
goto error;
if (!SetFileCompletionNotificationModes((HANDLE) socket,
FILE_SKIP_SET_EVENT_ON_HANDLE))
goto error;
*driver_socket_out = socket;
return 0;