Skip to content

Instantly share code, notes, and snippets.

@erickt
Created October 1, 2011 03:29
Show Gist options
  • Select an option

  • Save erickt/1255548 to your computer and use it in GitHub Desktop.

Select an option

Save erickt/1255548 to your computer and use it in GitHub Desktop.
if (pSetFileCompletionNotificationModes) {
if (pSetFileCompletionNotificationModes((HANDLE) socket,
FILE_SKIP_SET_EVENT_ON_HANDLE |
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS)) {
handle->flags |= UV_HANDLE_SYNC_BYPASS_IOCP;
} else if (GetLastError() != ERROR_INVALID_FUNCTION) {
uv__set_sys_error(loop, GetLastError());
return -1;
}
}
if (pSetFileCompletionNotificationModes) {
if (!pSetFileCompletionNotificationModes((HANDLE) socket,
FILE_SKIP_SET_EVENT_ON_HANDLE |
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS)) {
uv__set_sys_error(loop, GetLastError());
return -1;
}
handle->flags |= UV_HANDLE_SYNC_BYPASS_IOCP;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment