L2Bot2.0/L2BotDll/Transports/DebugViewTransport.h
2023-01-16 15:33:32 +04:00

34 lines
621 B
C++

#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;
};