#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <assert.h>
#include "remote_node.h"
#include "common.h"
#include "render_net.h"
#include "socket.h"
int remote_node_init (struct remote_node *node_info, const char *addr_spec) {
// zero out the struct
memset(node_info, 0, sizeof(*node_info));
// XXX: currently, this is hardcoded to one, but should be automagically discovered
node_info->parallel_renders = 1;
// build the endpoint
endpoint_init(&node_info->endpoint, RENDER_PORT);
if (endpoint_parse(&node_info->endpoint, addr_spec))
return -1;
// success!
node_info->valid = 1;
return 0;
}