#include "blitz/network/Network.h"

#include "blitz/misc/Log.h"

namespace blitz {
namespace network {

#ifdef _WIN32
NetworkInitializer::NetworkInitializer() {
	WSADATA wsaData;
	if (WSAStartup(MAKEWORD(2, 2), &wsaData) < 0) {
		utils::LOGE("Failed to initialize network !");
	} else {
		utils::LOG("Network initialized !");
	}
}
NetworkInitializer::~NetworkInitializer() {
	WSACleanup();
}
#else
NetworkInitializer::NetworkInitializer() {}
NetworkInitializer::~NetworkInitializer() {}
#endif

}  // namespace network
}  // namespace blitz
