#ifndef REMOTE_NODE_H
#define REMOTE_NODE_H
#include <sys/socket.h>
#include "config.h"
/*
* Information about a single remote render node.
*/
struct remote_node {
int valid;
/*
* Static information
*/
// the remote endpoint
struct config_endpoint endpoint;
// how many render requests this node can process concurrently
int parallel_renders;
/*
* Dynamic information
*/
// an estimate of how many render requests this node is currently processing
int current_load;
};
/*
* Initialize the given remote_node struct to work with the render node at the given address (à la parse_address).
*
* Note that this is a blocking function, and should only be called at startup.
*
* returns nonzero on error, zero on success.
*/
int remote_node_init (struct remote_node *node_info, const char *addr_spec);
#endif /* REMOTE_NODE_H */