AuroraRuntime/Source/IO/Loop/Loop.cpp
Reece Wilson f86665fd36 [+] Net: TCP servers can now be multi-threaded
[+] Net: Added missing UDP send datagram
[*] IO bug fixes
2022-11-17 20:58:48 +00:00

52 lines
1.1 KiB
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Loop.cpp
Date: 2021-9-21
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "Loop.hpp"
namespace Aurora::IO::Loop
{
#if !defined(AURORA_IS_MODERNNT_DERIVED)
AUKN_SYM AuSPtr<ILoopSource> NewLSWin32Source(bool)
{
return {};
}
#endif
#if !defined(AURORA_IS_XNU_DERIVED)
AUKN_SYM AuSPtr<ILoopSource> NewLSAppleSource()
{
return {};
}
#endif
AUKN_SYM AuSPtr<ILoopSource> NewLSFile(const AuSPtr<AuIO::IAsyncTransaction> &pFileTransaction)
{
if (!pFileTransaction)
{
SysPushErrorArg();
return {};
}
return pFileTransaction->NewLoopSource();
}
AUKN_SYM AuSPtr<ILoopSource> NewStdIn()
{
return AuConsole::StdInBufferLoopSource();
}
AUKN_SYM AuSPtr<ILoopSource> NewLSAsync(Async::WorkerPId_t workerPid)
{
if (!workerPid.pool)
{
return Async::GetAsyncApp()->WorkerToLoopSource(workerPid);
}
return workerPid.pool->WorkerToLoopSource(workerPid);
}
}