Refactor to use LockedWrapper guard

This commit is contained in:
2023-09-03 02:01:32 -04:00
parent 4073c88d08
commit e237c28382
7 changed files with 166 additions and 64 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include "CoreMinimal.h"
#include "LockedWrapper.h"
#include <string>
// Class FLpxSockets
@@ -33,15 +34,19 @@ protected:
public:
// Create the Luprex socket system.
static FLpxSockets* Create(EngineWrapper *w);
static FLpxSockets* Create(FLockedWrapper &w);
// Delete the luprex socket system. Cleanly closes all sockets.
// Close all sockets.
virtual void ForceCloseEverything(FLockedWrapper& w) = 0;
// The update routine relays data into and out of
// luprex via TCP/IP sockets.
virtual void Update(FLockedWrapper& w) = 0;
// Delete the luprex socket system.
// You must call ForceCloseEverything first.
virtual ~FLpxSockets() {}
// Obtain any error status report.
virtual std::string GetError() = 0;
// The update routine relays data into and out of
// luprex via TCP/IP sockets.
virtual void Update() = 0;
};