#include "key.h"#include "jrb.h"Go to the source code of this file.
Classes | |
| struct | ChimeraHost |
| struct | ChimeraState |
Defines | |
| #define | SUCCESS_WINDOW 20 |
| #define | GOOD_LINK 0.8 |
| #define | BAD_LINK 0.3 |
Functions | |
| ChimeraHost * | host_get (ChimeraState *state, char *hn, int port) |
| void | host_release (ChimeraState *state, ChimeraHost *host) |
| ChimeraHost * | host_decode (ChimeraState *state, char *s) |
| void | host_encode (char *s, int len, ChimeraHost *host) |
| void | host_update_stat (ChimeraHost *host, int success) |
| void * | host_init (void *logs, int size) |
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
host_decode: decodes a string into a chimera host structure. This acts as a host_get, and should be followed eventually by a host_release. |
|
||||||||||||||||
|
host_encode: encodes the host# into a string, putting it in s#, which has len# bytes in it. |
|
||||||||||||||||
|
host_get: gets a host entry for the given host, getting it from the cache if possible, or alocates memory for it |
|
||||||||||||
|
host_init: initialize a host struct with a size# element cache. |
|
||||||||||||
|
host_release: releases a host from the cache, declaring that the memory could be freed any time. returns NULL if the entry is deleted, otherwise it returns host# |
|
||||||||||||
|
host_update_stat: updates the success rate to the host based on the SUCCESS_WINDOW average |
1.4.5