/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuNetInterface.hpp
Date: 2022-8-16
Author: Reece
***/
#pragma once
#include "AuNetSrvWorkers.hpp"
#include "AuNetSrvSockets.hpp"
#include "AuNetSrvResolve.hpp"
#include "AuNetSrvDatagram.hpp"
#include "AuNetSrvInterfaces.hpp"
namespace Aurora::IO::Net
{
struct NetInterface : INetInterface, AuEnableSharedFromThis<NetInterface>
NetInterface();
AuSPtr<INetSrvWorkers> GetWorkersService() override;
AuSPtr<INetSrvResolve> GetResolveService() override;
AuSPtr<INetSrvSockets> GetSocketService() override;
AuSPtr<INetSrvDatagram> GetDatagramService() override;
AuSPtr<INetSrvInterfaces> GetInterfacesService() override;
bool TrySchedule(const AuSPtr<IIOProcessorWorkUnit> &pWorkUnit) override;
AuSPtr<NetWorker> TryScheduleEx();
void Shutdown() override;
void Destroy() override;
private:
NetSrvWorkers netServiceWorkers_; // Soviet Union Anthem
NetSrvSockets netServiceSockets_;
NetSrvResolve netServiceResolve_;
NetSrvDatagram netServiceDatagram_;
NetSrvInterfaces netServiceInterfaces_;
AuUInt atomicCounter_;
};
}