working commit
This commit is contained in:
+3
-10
@@ -10,16 +10,9 @@ private:
|
||||
int sock;
|
||||
int family;
|
||||
public:
|
||||
TCPClient();
|
||||
TCPClient(void);
|
||||
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);
|
||||
}
|
||||
std::expected<int, std::string> Read(std::string& buffer, int size);
|
||||
~TCPClient(void);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user