equal
deleted
inserted
replaced
1 #ifndef REMOTE_NODE_H |
1 #ifndef REMOTE_NODE_H |
2 #define REMOTE_NODE_H |
2 #define REMOTE_NODE_H |
3 |
3 |
4 #include <sys/socket.h> |
4 #include <sys/socket.h> |
|
5 |
|
6 #include "config.h" |
5 |
7 |
6 /* |
8 /* |
7 * Information about a single remote render node. |
9 * Information about a single remote render node. |
8 */ |
10 */ |
9 |
11 |
11 int valid; |
13 int valid; |
12 |
14 |
13 /* |
15 /* |
14 * Static information |
16 * Static information |
15 */ |
17 */ |
16 |
18 |
17 // the remote address, note how this can both AF_INET and AF_LOCAL |
19 // the remote endpoint |
18 struct sockaddr_storage addr; |
20 struct config_endpoint endpoint; |
19 |
21 |
20 // how many render requests this node can process concurrently |
22 // how many render requests this node can process concurrently |
21 int parallel_renders; |
23 int parallel_renders; |
22 |
24 |
23 /* |
25 /* |
27 // an estimate of how many render requests this node is currently processing |
29 // an estimate of how many render requests this node is currently processing |
28 int current_load; |
30 int current_load; |
29 }; |
31 }; |
30 |
32 |
31 /* |
33 /* |
32 * Initialize the given remote_node struct to work with the render node at the given host/port. |
34 * Initialize the given remote_node struct to work with the render node at the given address (à la parse_address). |
33 * |
|
34 * Portname may also be NULL, in which case the default port is used. |
|
35 * |
35 * |
36 * Note that this is a blocking function, and should only be called at startup. |
36 * Note that this is a blocking function, and should only be called at startup. |
37 * |
37 * |
38 * returns nonzero on error, zero on success. |
38 * returns nonzero on error, zero on success. |
39 */ |
39 */ |
40 int remote_node_init (struct remote_node *node_info, const char *hostname, const char *portname); |
40 int remote_node_init (struct remote_node *node_info, const char *addr_spec); |
41 |
41 |
42 #endif /* REMOTE_NODE_H */ |
42 #endif /* REMOTE_NODE_H */ |