Add project files.
This commit is contained in:
34
L2BotDll/Transports/DebugViewTransport.h
Normal file
34
L2BotDll/Transports/DebugViewTransport.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
#include "Domain/Transports/TransportInterface.h"
|
||||
#include <Windows.h>
|
||||
#include <thread>
|
||||
|
||||
using namespace L2Bot::Domain;
|
||||
|
||||
class DebugViewTransport : public Transports::TransportInterface
|
||||
{
|
||||
public:
|
||||
const bool Connect() override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
const bool IsConnected() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
const void Send(std::string data) override
|
||||
{
|
||||
OutputDebugStringA(data.c_str());
|
||||
}
|
||||
const std::string Receive() override
|
||||
{
|
||||
// delay imitation
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
return "";
|
||||
}
|
||||
|
||||
DebugViewTransport() = default;
|
||||
virtual ~DebugViewTransport() = default;
|
||||
};
|
Reference in New Issue
Block a user