working commit
This commit is contained in:
+8
-5
@@ -8,13 +8,16 @@
|
||||
class TCPClient {
|
||||
private:
|
||||
int sock;
|
||||
int family;
|
||||
public:
|
||||
TCPClient();
|
||||
std::expected<void, std::string> conn(std::string address, const int port);
|
||||
std::expected<int, std::string> writeBytes(std::span<const std::byte> payload);
|
||||
std::expected<int, std::string> writeBytes(std::string payload);
|
||||
std::expected<int, std::string> readBytes(std::vector<std::byte>* buffer);
|
||||
std::expected<int, std::string> readBytes(std::vector<uint8_t>* buffer);
|
||||
std::expected<void, std::string> Connect(std::string address, const int port);
|
||||
|
||||
std::expected<int, std::string> Write(std::span<const std::byte> payload);
|
||||
std::expected<int, std::string> Write(std::string payload);
|
||||
|
||||
std::expected<int, std::string> Read(std::vector<std::byte>* buffer);
|
||||
std::expected<int, std::string> Read(std::vector<uint8_t>* buffer);
|
||||
|
||||
~TCPClient() {
|
||||
close(sock);
|
||||
|
||||
Reference in New Issue
Block a user