Network/Algorithm: Add HostToNet and NetToHost
This commit is contained in:
@@ -11,10 +11,17 @@
|
||||
#include <Nazara/Network/Config.hpp>
|
||||
#include <functional>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
NAZARA_NETWORK_API bool ParseIPAddress(const char* addressPtr, UInt8 result[16], UInt16* port = nullptr, bool* isIPv6 = nullptr, const char** endOfRead = nullptr);
|
||||
|
||||
template<typename T>
|
||||
std::enable_if_t<std::is_arithmetic<T>::value, T> HostToNet(T value);
|
||||
|
||||
template<typename T>
|
||||
std::enable_if_t<std::is_arithmetic<T>::value, T> NetToHost(T value);
|
||||
}
|
||||
|
||||
#include <Nazara/Network/Algorithm.inl>
|
||||
|
||||
Reference in New Issue
Block a user