remote_node.h
author Tero Marttila <terom@fixme.fi>
Wed, 27 Aug 2008 21:30:32 +0300
changeset 41 540737bf6bac
parent 26 6d615203d963
permissions -rw-r--r--
sending requests, and partial support for receiving -- incomplete, not tested
9
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     1
#ifndef REMOTE_NODE_H
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     2
#define REMOTE_NODE_H
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     3
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     4
#include <sys/socket.h>
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     5
26
6d615203d963 support for PF_LOCAL, it works, but needs some more testing/cleanup old code
Tero Marttila <terom@fixme.fi>
parents: 13
diff changeset
     6
#include "config.h"
6d615203d963 support for PF_LOCAL, it works, but needs some more testing/cleanup old code
Tero Marttila <terom@fixme.fi>
parents: 13
diff changeset
     7
9
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     8
/*
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     9
 * Information about a single remote render node.
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    10
 */
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    11
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    12
struct remote_node {
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    13
    int valid;
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    14
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    15
    /*
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    16
     * Static information
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    17
     */
26
6d615203d963 support for PF_LOCAL, it works, but needs some more testing/cleanup old code
Tero Marttila <terom@fixme.fi>
parents: 13
diff changeset
    18
    
6d615203d963 support for PF_LOCAL, it works, but needs some more testing/cleanup old code
Tero Marttila <terom@fixme.fi>
parents: 13
diff changeset
    19
    // the remote endpoint
6d615203d963 support for PF_LOCAL, it works, but needs some more testing/cleanup old code
Tero Marttila <terom@fixme.fi>
parents: 13
diff changeset
    20
    struct config_endpoint endpoint;
9
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    21
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    22
    // how many render requests this node can process concurrently
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    23
    int parallel_renders;
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    24
    
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    25
    /*
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    26
     * Dynamic information
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    27
     */
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    28
13
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents: 9
diff changeset
    29
    // an estimate of how many render requests this node is currently processing
9
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    30
    int current_load;
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    31
};
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    32
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    33
/*
26
6d615203d963 support for PF_LOCAL, it works, but needs some more testing/cleanup old code
Tero Marttila <terom@fixme.fi>
parents: 13
diff changeset
    34
 * Initialize the given remote_node struct to work with the render node at the given address (à la parse_address).
9
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    35
 *
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    36
 * Note that this is a blocking function, and should only be called at startup.
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    37
 *
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    38
 * returns nonzero on error, zero on success.
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    39
 */
26
6d615203d963 support for PF_LOCAL, it works, but needs some more testing/cleanup old code
Tero Marttila <terom@fixme.fi>
parents: 13
diff changeset
    40
int remote_node_init (struct remote_node *node_info, const char *addr_spec);
9
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    41
fb6632e6c1bb two new modules, remote_node and remote_pool
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    42
#endif /* REMOTE_NODE_H */