Add socket module with overlapped socket support
This commit is contained in:
parent
e9a0a93d3c
commit
154e2f2ff7
32
source/tanya/async/iocp.d
Normal file
32
source/tanya/async/iocp.d
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copyright: Eugene Wissner 2016.
|
||||||
|
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||||
|
* Mozilla Public License, v. 2.0).
|
||||||
|
* Authors: $(LINK2 mailto:belka@caraus.de, Eugene Wissner)
|
||||||
|
*/
|
||||||
|
module tanya.async.iocp;
|
||||||
|
|
||||||
|
version (Windows):
|
||||||
|
|
||||||
|
import core.sys.windows.winbase;
|
||||||
|
import core.sys.windows.windef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides an extendable representation of a Win32 $(D_PSYMBOL OVERLAPPED)
|
||||||
|
* structure.
|
||||||
|
*/
|
||||||
|
class State
|
||||||
|
{
|
||||||
|
/// For internal use by Windows API.
|
||||||
|
align(1) OVERLAPPED overlapped;
|
||||||
|
|
||||||
|
/// File/socket handle.
|
||||||
|
HANDLE handle;
|
||||||
|
|
||||||
|
/// For keeping events or event masks.
|
||||||
|
int event;
|
||||||
|
}
|
1373
source/tanya/network/socket.d
Normal file
1373
source/tanya/network/socket.d
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user