30 lines
689 B
C++
30 lines
689 B
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: AuNetSrvInterfaces.hpp
|
|
Date: 2022-11-14
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::IO::Net
|
|
{
|
|
struct NetSrvInterfaces : INetSrvInterfaces
|
|
{
|
|
const AuString &GetHostname() override;
|
|
void ResetAdapterCache() override;
|
|
AuList<AuSPtr<INetAdapter>> GetAdapters() override;
|
|
|
|
bool IsSupportedOnOS();
|
|
|
|
|
|
private:
|
|
|
|
void UpdateCache();
|
|
|
|
AuThreadPrimitives::SpinLock lock;
|
|
AuString hostname;
|
|
bool bShouldUpdateCache { true };
|
|
AuList<AuSPtr<INetAdapter>> adapters;
|
|
};
|
|
} |