23 lines
437 B
C++
23 lines
437 B
C++
#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);
|
|
}; |