Fix socket build on Windows
This commit is contained in:
parent
0156c5a883
commit
86d87430da
@ -6,7 +6,7 @@
|
|||||||
* Copyright: Eugene Wissner 2016.
|
* Copyright: Eugene Wissner 2016.
|
||||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||||
* Mozilla Public License, v. 2.0).
|
* Mozilla Public License, v. 2.0).
|
||||||
* Authors: $(LINK2 mailto:belka@caraus.de, Eugene Wissner)
|
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||||
*/
|
*/
|
||||||
module tanya.network.socket;
|
module tanya.network.socket;
|
||||||
|
|
||||||
@ -134,25 +134,42 @@ else version (Windows)
|
|||||||
extern (Windows) @nogc nothrow
|
extern (Windows) @nogc nothrow
|
||||||
{
|
{
|
||||||
private SOCKET WSASocketW(int af,
|
private SOCKET WSASocketW(int af,
|
||||||
int type,
|
int type,
|
||||||
int protocol,
|
int protocol,
|
||||||
LPWSAPROTOCOL_INFO lpProtocolInfo,
|
LPWSAPROTOCOL_INFO lpProtocolInfo,
|
||||||
GROUP g,
|
GROUP g,
|
||||||
DWORD dwFlags);
|
DWORD dwFlags);
|
||||||
int WSARecv(SOCKET s,
|
int WSARecv(SOCKET s,
|
||||||
LPWSABUF lpBuffers,
|
LPWSABUF lpBuffers,
|
||||||
DWORD dwBufferCount,
|
DWORD dwBufferCount,
|
||||||
LPDWORD lpNumberOfBytesRecvd,
|
LPDWORD lpNumberOfBytesRecvd,
|
||||||
LPDWORD lpFlags,
|
LPDWORD lpFlags,
|
||||||
LPOVERLAPPED lpOverlapped,
|
LPOVERLAPPED lpOverlapped,
|
||||||
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
|
||||||
int WSASend(SOCKET s,
|
int WSASend(SOCKET s,
|
||||||
LPWSABUF lpBuffers,
|
LPWSABUF lpBuffers,
|
||||||
DWORD dwBufferCount,
|
DWORD dwBufferCount,
|
||||||
LPDWORD lpNumberOfBytesRecvd,
|
LPDWORD lpNumberOfBytesRecvd,
|
||||||
DWORD lpFlags,
|
DWORD lpFlags,
|
||||||
LPOVERLAPPED lpOverlapped,
|
LPOVERLAPPED lpOverlapped,
|
||||||
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
|
||||||
|
int WSAIoctl(SOCKET s,
|
||||||
|
uint dwIoControlCode,
|
||||||
|
void* lpvInBuffer,
|
||||||
|
uint cbInBuffer,
|
||||||
|
void* lpvOutBuffer,
|
||||||
|
uint cbOutBuffer,
|
||||||
|
uint* lpcbBytesReturned,
|
||||||
|
LPWSAOVERLAPPED lpOverlapped,
|
||||||
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
|
||||||
|
alias LPFN_ACCEPTEX = BOOL function(SOCKET,
|
||||||
|
SOCKET,
|
||||||
|
PVOID,
|
||||||
|
DWORD,
|
||||||
|
DWORD,
|
||||||
|
DWORD,
|
||||||
|
LPDWORD,
|
||||||
|
LPOVERLAPPED);
|
||||||
}
|
}
|
||||||
alias WSASocket = WSASocketW;
|
alias WSASocket = WSASocketW;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user