28 lines
596 B
C++
28 lines
596 B
C++
|
|
#ifndef FAKECLIENT_HPP
|
|
#define FAKECLIENT_HPP
|
|
|
|
#include <expected>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <span>
|
|
#include <iostream>
|
|
#include <sstream>
|
|
#include <memory>
|
|
|
|
#include <netclient.hpp>
|
|
#include <nethandler.hpp>
|
|
|
|
class TestConnector : public NetClient {
|
|
private:
|
|
NetHandler* handler;
|
|
std::stringstream backss;
|
|
public:
|
|
TestConnector(NetHandler& hand);
|
|
std::expected<int, std::string> Write(std::string payload) override;
|
|
std::expected<int, std::string> Read(std::string& buffer, int size) override;
|
|
~TestConnector(void);
|
|
};
|
|
|
|
#endif
|