26 lines
623 B
C++
26 lines
623 B
C++
//
|
|
// Created by Иван Игоревич Овчинников on 08.06.2026.
|
|
//
|
|
|
|
#ifndef IOVI_NETWORK_SIMPLE_CLIENT_H
|
|
#define IOVI_NETWORK_SIMPLE_CLIENT_H
|
|
|
|
#include "NetworkConfig.h"
|
|
#include <string>
|
|
|
|
class SimpleClient {
|
|
SOCKET_TYPE clientSocket; // The client's walkie-talkie
|
|
|
|
public:
|
|
SimpleClient();
|
|
~SimpleClient();
|
|
|
|
// Returns true if we successfully dialed and connected, false otherwise
|
|
bool connectTo(const std::string& ip, int port);
|
|
|
|
// Sends a message and waits for the server to echo it back
|
|
void talk(const std::string& message) const;
|
|
};
|
|
|
|
#endif // IOVI_NETWORK_SIMPLE_CLIENT_H
|