OpFlex Framework  1.3.0
ofpeerstatuslistener_c.h File Reference

C wrapper for peer status listener. More...

#include "ofcore_c.h"

Go to the source code of this file.

Macros

#define OF_PEERSTATUS_DISCONNECTED   0
 The peer is disconnected and not trying to connect.
 
#define OF_PEERSTATUS_CONNECTING   1
 The peer is connecting.
 
#define OF_PEERSTATUS_CONNECTED   2
 The peer is connected but not yet ready.
 
#define OF_PEERSTATUS_READY   3
 The peer is connected and ready.
 
#define OF_PEERSTATUS_CLOSING   4
 The peer connection is closing.
 
#define OF_PEERSTATUS_ERROR   -1
 An error occurred.
 
#define OF_POOLHEALTH_DOWN   0
 There is no ready opflex peer connection.
 
#define OF_POOLHEALTH_DEGRADED   1
 At least one opflex peer is in a state other than READY.
 
#define OF_POOLHEALTH_HEALTHY   2
 All opflex peers are connected and ready.
 
#define OF_POOLHEALTH_ERROR   -1
 An error occurred.
 

Typedefs

typedef ofobj_p ofpeerstatuslistener_p
 cpoolhealth More...
 
typedef void(* ofpeerstatus_peer_p )(void *user_data, const char *peerhostname, int port, int status)
 A function pointer to receive peer status updates. More...
 
typedef void(* ofpeerstatus_health_p )(void *user_data, int health)
 A function pointer to recieve connection pool health status updates. More...
 

Functions

ofstatus ofpeerstatuslistener_create (void *user_data, ofpeerstatus_peer_p peer_callback, ofpeerstatus_health_p health_callback, ofpeerstatuslistener_p *obj)
 Creates peer status listener object. More...
 
ofstatus ofpeerstatuslistener_destroy (ofpeerstatuslistener_p *obj)
 Destroy the peer status listener object, and zero the pointer. More...
 

Detailed Description

C wrapper for peer status listener.