7.24.1. Application Interface

// Initialization for listening on given port
ChimeraState *chimera_init (int port);

// Join a network using a known bootstrap host
void chimera_join (ChimeraState *state, ChimeraHost *bootstrap);

// Manage objects representing hosts
ChimeraHost *host_get (ChimeraState *state, char *hostname, int port);
void host_release (ChimeraState *state, ChimeraHost *host);

// Upcall for host membership change notification
typedef void (*chimera_update_upcall_t) (Key *key, ChimeraHost *host, int joined);
void chimera_update (chimera_update_upcall_t func);
// Register a message type
void chimera_register (ChimeraState *state, int type, int ack);

// Create a key from a string
void key_makehash (void *log, Key *hashed, char *s);

// Send a message to host responsible for key
void chimera_send (ChimeraState *state, Key key, int type, int len, char *data);

// Upcall for message forward event
typedef void (*chimera_forward_upcall_t) (Key **key, Message **msg, ChimeraHost **host);
void chimera_forward (chimera_forward_upcall_t func);

// Upcall for message delivery event
typedef void (*chimera_deliver_upcall_t) (Key *key, Message *msg);
void chimera_deliver (chimera_deliver_upcall_t func);

References. 

  1. Chimera: A Structured Peer to Peer Overlay. http://current.cs.ucsb.edu/projects/chimera