--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remote_node.h Fri Jun 06 03:24:55 2008 +0300
@@ -0,0 +1,42 @@
+#ifndef REMOTE_NODE_H
+#define REMOTE_NODE_H
+
+#include <sys/socket.h>
+
+/*
+ * Information about a single remote render node.
+ */
+
+struct remote_node {
+ int valid;
+
+ /*
+ * Static information
+ */
+
+ // the remote address, note how this can both AF_INET and AF_LOCAL
+ struct sockaddr_storage addr;
+
+ // how many render requests this node can process concurrently
+ int parallel_renders;
+
+ /*
+ * Dynamic information
+ */
+
+ // 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 host/port.
+ *
+ * Portname may also be NULL, in which case the default port is used.
+ *
+ * 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 *hostname, const char *portname);
+
+#endif /* REMOTE_NODE_H */