Setting up Client Node
Prerequisites
1. Include Necessary Headers
#include <iostream>
#include <chrono>
#include "cofhe.hpp"
#include "node/network_details.hpp"
#include "node/client_node.hpp"
#include "node/compute_request_handler.hpp"2. Set Up the Client Node
int main(int argc, char* argv[]) {
// Check for the required number of command-line arguments
if (argc < 5) {
std::cerr << "Usage: " << argv[0] << " <client_ip> <client_port> <setup_ip> <setup_port>" << std::endl;
return 1;
}
// Parse node details from command-line arguments
auto self_details = NodeDetails{argv[1], argv[2], NodeType::CLIENT_NODE};
auto setup_node_details = NodeDetails{argv[3], argv[4], NodeType::SETUP_NODE};
// Create the client node
auto client_node = make_client_node<CPUCryptoSystem>(setup_node_details);
// Get the CryptoSystem instance from the client node
auto& cs = client_node.crypto_system();Last updated