forked from cafeberry/cafeberry
chore/fix: clean up NetworkSocketLayer, fix console compile errors
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
#include <WinSock2.h>
|
||||
#elif defined _XBOX
|
||||
#include <winsockx.h>
|
||||
#else
|
||||
typedef int SOCKET;
|
||||
#define INVALID_SOCKET -1
|
||||
#endif
|
||||
|
||||
class NetworkSocketManager {
|
||||
public:
|
||||
bool IsSocketValid(SOCKET sock);
|
||||
bool IsSentValid(int sent);
|
||||
int getSocketError(SOCKET sock);
|
||||
int CloseSocket(SOCKET sock);
|
||||
int TCPaddrinfo(PCSTR ip, int port);
|
||||
bool InitNetwork();
|
||||
SOCKET MakeHostSocket(int port);
|
||||
};
|
||||
Reference in New Issue
Block a user