46 lines
881 B
C++
46 lines
881 B
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: Net.cpp
|
|
Date: 2022-8-22
|
|
Author: Reece
|
|
***/
|
|
#include "Networking.hpp"
|
|
#include "Net.hpp"
|
|
|
|
#if defined(AURORA_IS_LINUX_DERIVED)
|
|
#include "AuNetResolver.Unix.hpp"
|
|
#endif
|
|
|
|
namespace Aurora::IO::Net
|
|
{
|
|
static bool gWin32NetReady { };
|
|
|
|
void InitNetworking()
|
|
{
|
|
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
|
WORD wVersionRequested;
|
|
WSADATA wsaData;
|
|
|
|
wVersionRequested = MAKEWORD(2, 2);
|
|
gWin32NetReady = !WSAStartup(wVersionRequested, &wsaData);
|
|
|
|
#endif
|
|
|
|
#if defined(AURORA_IS_LINUX_DERIVED)
|
|
InitFreetardedResolver();
|
|
#endif
|
|
|
|
// ANYONE ELSE? MUSLC FUCKERS?
|
|
|
|
}
|
|
|
|
bool IsNetReady()
|
|
{
|
|
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
|
return gWin32NetReady;
|
|
#else
|
|
return true;
|
|
#endif
|
|
}
|
|
} |