/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuNetSrvWorkers.cpp
Date: 2022-8-16
Author: Reece
***/
#pragma once
namespace Aurora::IO::Net
{
struct NetWorker;
struct NetSrvWorkers : INetSrvWorkers
NetSrvWorkers();
AuSPtr<INetWorker> Attach(const AuSPtr<IIOProcessor> &processor) override;
void Destroy() override;
void RemoveCache(NetWorker *worker);
AuSPtr<NetWorker> GetWorkerByIndex(AuUInt index);
AuSPtr<INetWorker> GetWorkerByIndexSafe(AuUInt index) override;
private:
AuList<AuSPtr<NetWorker>> workerPool_;
AuThreadPrimitives::Mutex mutex_;
};
}