ethanglide
c9a50d363e
Got multiple remote calls from one client working Improved error messages Got function name and arguments sent over as well as return values
26 lines
436 B
C++
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
|