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