Jamie Reece Wilson
ca2c0462ab
[*] NT: Fix missing CoTaskMemFree leak on startup [*] Fix ConsoleStd restart bug
30 lines
768 B
C++
30 lines
768 B
C++
/***
|
|
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_;
|
|
};
|
|
} |