stable
This commit is contained in:
parent
b906e0e66c
commit
20ac8620e6
20 changed files with 86 additions and 853 deletions
41
Connection/tests/RemoteConnection.hpp
Normal file
41
Connection/tests/RemoteConnection.hpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#pragma once
|
||||
|
||||
#include "ConnectionCommon.hpp"
|
||||
#include "List.hpp"
|
||||
|
||||
namespace tp {
|
||||
|
||||
class RemoteConnectionContext;
|
||||
|
||||
class RemoteConnection : public Connection {
|
||||
public:
|
||||
class Location {
|
||||
ualni mId = 0;
|
||||
|
||||
public:
|
||||
Location() = default;
|
||||
};
|
||||
|
||||
public:
|
||||
RemoteConnection(){ MODULE_SANITY_CHECK(gModuleConnection) };
|
||||
|
||||
virtual ~RemoteConnection() {
|
||||
if (mStatus.isOpened()) RemoteConnection::disconnect();
|
||||
}
|
||||
|
||||
public:
|
||||
virtual bool connect(const Location& location, const Type& connectionInfo);
|
||||
virtual bool disconnect();
|
||||
|
||||
public:
|
||||
virtual const Location& getLocation() { return mLocation; }
|
||||
|
||||
public:
|
||||
virtual bool readBytes(Byte* bytes, SizeBytes size);
|
||||
virtual bool writeBytes(const Byte* bytes, SizeBytes size);
|
||||
|
||||
private:
|
||||
RemoteConnectionContext* mHandle = nullptr;
|
||||
Location mLocation;
|
||||
};
|
||||
}
|
||||
11
Connection/tests/TestRemote.cpp
Normal file
11
Connection/tests/TestRemote.cpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
#include "RemoteConnection.hpp"
|
||||
#include "Testing.hpp"
|
||||
|
||||
using namespace tp;
|
||||
|
||||
TEST_DEF_STATIC(Simple) {
|
||||
TEST(false);
|
||||
}
|
||||
|
||||
TEST_DEF(RemoteConnection) { testSimple(); }
|
||||
Loading…
Add table
Add a link
Reference in a new issue