2022-08-28 19:02:06 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: AuNetSocketServer.NT.hpp
|
|
|
|
Date: 2022-8-22
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "AuNetSocketServerAcceptReadOperation.hpp"
|
|
|
|
|
|
|
|
namespace Aurora::IO::Net
|
|
|
|
{
|
2022-11-17 20:56:41 +00:00
|
|
|
struct SocketServerImpl : SocketServer
|
2022-08-28 19:02:06 +00:00
|
|
|
{
|
|
|
|
SocketServerImpl(struct NetInterface *pInterface,
|
|
|
|
struct NetWorker *pWorker,
|
|
|
|
const AuSPtr<ISocketServerDriver> &pDriver,
|
|
|
|
const AuSPtr<ISocketDriverFactory> &pSocketDriverFactory,
|
2022-12-16 17:18:12 +00:00
|
|
|
AuUInt32 uMaxConnections,
|
|
|
|
AuUInt32 uDefaultInputStreamSize,
|
2022-12-12 23:50:05 +00:00
|
|
|
bool bMultiThreaded);
|
2022-08-28 19:02:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
virtual void DoNonblockingReadTick() override;
|
|
|
|
|
|
|
|
virtual bool InitSocket(const NetEndpoint &localAddress) override;
|
|
|
|
virtual bool ImplBind() override;
|
|
|
|
virtual bool ImplListen() override;
|
|
|
|
virtual bool BeginAcceptLoop() override;
|
|
|
|
void DetroyServer() override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
SocketServerAcceptReadOperation acceptOperation_;
|
|
|
|
AuSPtr<ISocketDriverFactory> pSocketDriverFactory_;
|
|
|
|
};
|
|
|
|
}
|