L2Bot2.0/L2BotDll/Transports/DebugViewTransport.h
2023-01-25 19:53:02 +04:00

34 lines
631 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(const std::wstring& data) override
{
OutputDebugStringW(data.c_str());
}
const std::wstring Receive() override
{
// delay imitation
std::this_thread::sleep_for(std::chrono::milliseconds(50));
return L"";
}
DebugViewTransport() = default;
virtual ~DebugViewTransport() = default;
};