terom@9: #ifndef REMOTE_NODE_H terom@9: #define REMOTE_NODE_H terom@9: terom@9: #include terom@9: terom@9: /* terom@9: * Information about a single remote render node. terom@9: */ terom@9: terom@9: struct remote_node { terom@9: int valid; terom@9: terom@9: /* terom@9: * Static information terom@9: */ terom@9: terom@9: // the remote address, note how this can both AF_INET and AF_LOCAL terom@9: struct sockaddr_storage addr; terom@9: terom@9: // how many render requests this node can process concurrently terom@9: int parallel_renders; terom@9: terom@9: /* terom@9: * Dynamic information terom@9: */ terom@9: terom@9: // how many render requests this node is currently processing terom@9: int current_load; terom@9: }; terom@9: terom@9: /* terom@9: * Initialize the given remote_node struct to work with the render node at the given host/port. terom@9: * terom@9: * Portname may also be NULL, in which case the default port is used. terom@9: * terom@9: * Note that this is a blocking function, and should only be called at startup. terom@9: * terom@9: * returns nonzero on error, zero on success. terom@9: */ terom@9: int remote_node_init (struct remote_node *node_info, const char *hostname, const char *portname); terom@9: terom@9: #endif /* REMOTE_NODE_H */