28 lines
		
	
	
		
			716 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			716 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| 
 | |
| #pragma once
 | |
| 
 | |
| #include "../../detect.hpp"
 | |
| #include "../../internal/common.hpp"
 | |
| 
 | |
| #if MIJIN_TARGET_OS == MIJIN_OS_LINUX
 | |
| #include <fcntl.h>
 | |
| #include <unistd.h>
 | |
| #include <arpa/inet.h>
 | |
| #include <sys/socket.h>
 | |
| #elif MIJIN_TARGET_OS == MIJIN_OS_WINDOWS
 | |
| #define _WINSOCK_DEPRECATED_NO_WARNINGS
 | |
| #include <WinSock2.h>
 | |
| #include <ws2tcpip.h>
 | |
| #include "../util/winundef.hpp"
 | |
| #endif // MIJIN_TARGET_OS
 | |
| 
 | |
| namespace mijin::detail
 | |
| {
 | |
| #if MIJIN_TARGET_OS == MIJIN_OS_WINDOWS
 | |
| bool initWSA() MIJIN_NOEXCEPT;
 | |
| StreamError translateWSAError() MIJIN_NOEXCEPT;
 | |
| StreamError translateWinError(DWORD error) MIJIN_NOEXCEPT;
 | |
| StreamError translateWinError() MIJIN_NOEXCEPT;
 | |
| #endif // MIJIN_TARGET_OS == MIJIN_OS_WINDOWS
 | |
| }// namespace mijin::detail
 |