Tilde Friends
SSB Connections

Typedefs

typedef struct _tf_ssb_t tf_ssb_t
 
typedef struct _tf_ssb_connections_t tf_ssb_connections_t
 

Functions

tf_ssb_connections_ttf_ssb_connections_create (tf_ssb_t *ssb)
 
void tf_ssb_connections_destroy (tf_ssb_connections_t *connections)
 
void tf_ssb_connections_store (tf_ssb_connections_t *connections, const char *host, int port, const char *key)
 
void tf_ssb_connections_set_attempted (tf_ssb_connections_t *connections, const char *host, int port, const char *key)
 
void tf_ssb_connections_set_succeeded (tf_ssb_connections_t *connections, const char *host, int port, const char *key)
 
void tf_ssb_connections_sync_start (tf_ssb_connections_t *connections)
 

Detailed Description

Primitive tracking for SSB connections, as in we tried to connect to host X Y seconds ago, and it failed. This needs to be replaced with something better.

Typedef Documentation

◆ tf_ssb_connections_t

typedef struct _tf_ssb_connections_t tf_ssb_connections_t

An SSB connections tracker instance.

◆ tf_ssb_t

typedef struct _tf_ssb_t tf_ssb_t

An SSB instance.

Function Documentation

◆ tf_ssb_connections_create()

tf_ssb_connections_t * tf_ssb_connections_create ( tf_ssb_t ssb)

Create a connection tracker.

Parameters
ssbThe SSB instance.
Returns
The connection tracker instance.

◆ tf_ssb_connections_destroy()

void tf_ssb_connections_destroy ( tf_ssb_connections_t connections)

Destroy a connection tracker.

Parameters
connectionsThe connection tracker to destroy.

◆ tf_ssb_connections_set_attempted()

void tf_ssb_connections_set_attempted ( tf_ssb_connections_t connections,
const char *  host,
int  port,
const char *  key 
)

Record that a connection was recently attempted.

Parameters
connectionsThe connection tracker.
hostThe host name or address.
portThe network port number.
keyThe identity on the other end of the connection.

◆ tf_ssb_connections_set_succeeded()

void tf_ssb_connections_set_succeeded ( tf_ssb_connections_t connections,
const char *  host,
int  port,
const char *  key 
)

Record that a connection recently succeeded.

Parameters
connectionsThe connection tracker.
hostThe host name or address.
portThe network port number.
keyThe identity on the other end of the connection.

◆ tf_ssb_connections_store()

void tf_ssb_connections_store ( tf_ssb_connections_t connections,
const char *  host,
int  port,
const char *  key 
)

Store a connection in the connection tracker.

Parameters
connectionsThe connection tracker.
hostThe host name or address.
portThe network port number.
keyThe identity on the other end of the connection.

◆ tf_ssb_connections_sync_start()

void tf_ssb_connections_sync_start ( tf_ssb_connections_t connections)

Initiate an immediate sync.

Parameters
connectionsThe connections tracker.