Small changes

This commit is contained in:
IlushaShurupov 2023-07-22 20:32:03 +03:00 committed by Ilya Shurupov
parent 8c600a1cdb
commit e50cb9f0e2
7 changed files with 131 additions and 79 deletions

View file

@ -0,0 +1,42 @@
#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;
};
}