1#ifndef NET_TCP_CLIENT_H
2#define NET_TCP_CLIENT_H
16 bool connect(
const std::string& ip,
int port);
17 int send(
const std::string* data,
size_t size);
18 int receive(std::string* buffer,
size_t size);
21 std::unique_ptr<Xale::Net::ISocket> _socket;
~TcpClient()
Destructor.
Definition TcpClient.cpp:15
int receive(std::string *buffer, size_t size)
Receives data from the server.
Definition TcpClient.cpp:48
TcpClient()
Constructor.
Definition TcpClient.cpp:8
bool connect(const std::string &ip, int port)
Connects to the server at the specified IP and port.
Definition TcpClient.cpp:23
void close()
Closes the connection.
Definition TcpClient.cpp:59
int send(const std::string *data, size_t size)
Sends data to the server.
Definition TcpClient.cpp:37
Definition IListenerSocket.h:7