mirror of
https://github.com/decaf-emu/decaf-emu.git
synced 2026-10-10 23:58:14 +00:00
28 lines
456 B
C++
28 lines
456 B
C++
#pragma once
|
|
#include "platform.h"
|
|
|
|
#ifdef PLATFORM_WINDOWS
|
|
#include <WinSock2.h>
|
|
#include <Ws2tcpip.h>
|
|
#else
|
|
#include <fcntl.h>
|
|
#include <netinet/in.h>
|
|
#include <sys/socket.h>
|
|
#include <sys/types.h>
|
|
#endif
|
|
|
|
namespace platform
|
|
{
|
|
|
|
#ifdef PLATFORM_WINDOWS
|
|
using Socket = SOCKET;
|
|
#else
|
|
using Socket = int;
|
|
#endif
|
|
|
|
bool socketWouldBlock(int result);
|
|
int socketSetBlocking(Socket socket, bool blocking);
|
|
int socketClose(Socket socket);
|
|
|
|
} // namespace platform
|