54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
|
/***
|
||
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
||
|
|
||
|
File: AuNetSocketServerAcceptReadOperation.cpp
|
||
|
Date: 2022-8-22
|
||
|
Author: Reece
|
||
|
***/
|
||
|
#include "Networking.hpp"
|
||
|
#include "AuNetSocket.hpp"
|
||
|
#include "AuNetSocketServerAcceptReadOperation.hpp"
|
||
|
#include "AuNetSocketServer.hpp"
|
||
|
|
||
|
namespace Aurora::IO::Net
|
||
|
{
|
||
|
SocketServerAcceptReadOperationBase::SocketServerAcceptReadOperationBase(SocketServer *pParent) :
|
||
|
pParent_(pParent)
|
||
|
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
||
|
, SocketOverlappedOperation(true)
|
||
|
#endif
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
||
|
|
||
|
void SocketServerAcceptReadOperationBase::OnOverlappedComplete()
|
||
|
{
|
||
|
this->pParent_->DoNonblockingReadTick();
|
||
|
}
|
||
|
|
||
|
void SocketServerAcceptReadOperationBase::OnOverlappedFailure(const NetError &error)
|
||
|
{
|
||
|
this->pParent_->SendErrorNoStream({});
|
||
|
}
|
||
|
|
||
|
#else
|
||
|
|
||
|
void SocketServerAcceptReadOperationBase::OnIOTick()
|
||
|
{
|
||
|
this->pParent_->DoNonblockingReadTick();
|
||
|
}
|
||
|
|
||
|
void SocketServerAcceptReadOperationBase::OnIOComplete()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
void SocketServerAcceptReadOperationBase::OnIOFailure()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|
||
|
}
|