cpp-console-game/eRPC/Client.hpp
ethanglide c9a50d363e Refine RPC library
Got multiple remote calls from one client working

Improved error messages

Got function name and arguments sent over as well as return values
2024-07-08 16:15:55 -04:00

26 lines
436 B
C++

#ifndef ERPC_CLIENT_HPP
#define ERPC_CLIENT_HPP
#include <string>
#include <vector>
#include <netinet/in.h>
namespace eRPC
{
class Client
{
public:
Client(std::string host, int port);
~Client();
std::string call(std::string method, std::vector<std::string> params);
private:
int sockfd;
sockaddr_in serverAddress;
void openConnection();
void closeConnection();
};
}
#endif // ERPC_CLIENT_HPP