1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 /** 6 * This module provides API for Windows I/O Completion Ports. 7 * 8 * Note: Available only on Windows. 9 * 10 * Copyright: Eugene Wissner 2016-2020. 11 * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, 12 * Mozilla Public License, v. 2.0). 13 * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) 14 * Source: $(LINK2 https://github.com/caraus-ecms/tanya/blob/master/source/tanya/async/iocp.d, 15 * tanya/async/iocp.d) 16 */ 17 module tanya.async.iocp; 18 19 version (Windows) 20 { 21 version = WindowsDoc; 22 } 23 else version (D_Ddoc) 24 { 25 version = WindowsDoc; 26 version (Windows) 27 { 28 } 29 else 30 { 31 private struct OVERLAPPED 32 { 33 } 34 private alias HANDLE = void*; 35 } 36 } 37 38 version (WindowsDoc): 39 40 import core.sys.windows.winbase; 41 42 /** 43 * Provides an extendable representation of a Win32 $(D_PSYMBOL OVERLAPPED) 44 * structure. 45 */ 46 class State 47 { 48 /// For internal use by Windows API. 49 align(1) OVERLAPPED overlapped; 50 51 /// File/socket handle. 52 HANDLE handle; 53 54 /// For keeping events or event masks. 55 int event; 56 }