[*] af5c8e86c0
20hrs ago: AuSPtr<AuMemoryViewXXX>s werent fully eliminated
This commit is contained in:
parent
124e9d1d0a
commit
3d652ed605
@ -12,7 +12,7 @@ namespace Aurora::IO::Net
|
||||
struct IDatagramServer : virtual ISocketBase
|
||||
{
|
||||
virtual void SendPacket(const NetEndpoint &destination,
|
||||
const AuSPtr<AuMemoryViewRead> &pPacketData,
|
||||
const AuMemoryViewRead &packetData,
|
||||
const AuSPtr<AuAsync::PromiseCallback<AuNullS, NetError>> &pCalback) = 0;
|
||||
|
||||
virtual AuSPtr<IDatagramDriver> GetDatagramDriver() = 0;
|
||||
|
@ -55,8 +55,8 @@ namespace Aurora::IO::FS
|
||||
|
||||
bool Init(const AuSPtr<IIOHandle> &handle);
|
||||
|
||||
bool StartRead(AuUInt64 offset, const AuSPtr<AuMemoryViewWrite> &memoryView) override;
|
||||
bool StartWrite(AuUInt64 offset, const AuSPtr<AuMemoryViewRead> &memoryView) override;
|
||||
bool StartRead(AuUInt64 offset, const AuMemoryViewWrite &memoryView) override;
|
||||
bool StartWrite(AuUInt64 offset, const AuMemoryViewRead &memoryView) override;
|
||||
|
||||
bool Complete() override;
|
||||
|
||||
|
@ -52,14 +52,14 @@ namespace Aurora::IO::Net
|
||||
}
|
||||
|
||||
void DatagramServer::SendPacket(const NetEndpoint &destination,
|
||||
const AuSPtr<AuMemoryViewRead> &pPacketData,
|
||||
const AuMemoryViewRead &packetData,
|
||||
const AuSPtr<AuAsync::PromiseCallback<AuNullS, NetError>> &pCalback2)
|
||||
{
|
||||
AuSPtr<AuIO::IAsyncFinishedSubscriberFunctional> pCallback;
|
||||
|
||||
if (pCalback2)
|
||||
{
|
||||
pCallback = AuMakeShared<AuIO::IAsyncFinishedSubscriberFunctional>([uSourceLength = pPacketData->length,
|
||||
pCallback = AuMakeShared<AuIO::IAsyncFinishedSubscriberFunctional>([uSourceLength = packetData.length,
|
||||
pCalback2 = AuSPtr<AuAsync::PromiseCallback<AuNullS, NetError>>(pCalback2)](AuUInt64 uOffset, AuUInt32 uLength)
|
||||
{
|
||||
if (uSourceLength != uLength)
|
||||
@ -99,7 +99,7 @@ namespace Aurora::IO::Net
|
||||
|
||||
pTransaction->SetCallback(pCallback);
|
||||
|
||||
if (!pTransaction->StartWrite(0, pPacketData))
|
||||
if (!pTransaction->StartWrite(0, packetData))
|
||||
{
|
||||
NetError error;
|
||||
NetError_SetCurrent(error);
|
||||
|
@ -14,7 +14,7 @@ namespace Aurora::IO::Net
|
||||
struct DatagramServer : virtual SocketServerImpl, virtual IDatagramServer
|
||||
{
|
||||
void SendPacket(const NetEndpoint &destination,
|
||||
const AuSPtr<AuMemoryViewRead> &pPacketData,
|
||||
const AuMemoryViewRead &pPacketData,
|
||||
const AuSPtr<AuAsync::PromiseCallback<AuNullS, NetError>> &pCalback) override;
|
||||
|
||||
DatagramServer(struct NetInterface *pInterface,
|
||||
|
@ -52,8 +52,8 @@ namespace Aurora::IO::UNIX
|
||||
pinSelf = this->pin_;
|
||||
pinMem = this->memPin_;
|
||||
|
||||
auto cp1 = context->readView;
|
||||
auto cp2 = context->writeView;
|
||||
auto cp1 = this->readView;
|
||||
auto cp2 = this->writeView;
|
||||
|
||||
if (AuExchange(this->bIsReadPending, false))
|
||||
{
|
||||
|
@ -25,8 +25,8 @@ namespace Aurora::IO::UNIX
|
||||
bool LIOS_Cancel();
|
||||
bool HasState();
|
||||
|
||||
void SetMemory(const AuSPtr<AuMemoryViewRead> &view);
|
||||
void SetMemory(const AuSPtr<AuMemoryViewWrite> &view);
|
||||
void SetMemory(const AuMemoryViewRead &view);
|
||||
void SetMemory(const AuMemoryViewWrite &view);
|
||||
|
||||
AuUInt64 GetData();
|
||||
AuUInt64 GetBuf();
|
||||
@ -47,6 +47,8 @@ namespace Aurora::IO::UNIX
|
||||
// TODO:
|
||||
AuSPtr<void> pin_;
|
||||
AuSPtr<void> memPin_;
|
||||
AuMemoryViewRead readView;
|
||||
AuMemoryViewWrite writeView;
|
||||
private:
|
||||
AuUInt64 dataPtr_ {};
|
||||
AuUInt dataLen_ {};
|
||||
|
Loading…
Reference in New Issue
Block a user