forked from cory/tildefriends
Hook up some stats from the SSB side.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3822 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
19
src/ssb.h
19
src/ssb.h
@ -39,6 +39,23 @@ enum {
|
||||
k_blob_id_len = 53,
|
||||
};
|
||||
|
||||
typedef struct _tf_ssb_stats_t
|
||||
{
|
||||
int connections;
|
||||
int broadcasts;
|
||||
int messages_stored;
|
||||
int rpc_in;
|
||||
int rpc_out;
|
||||
struct
|
||||
{
|
||||
int rpc;
|
||||
int connections_changed;
|
||||
int message_added;
|
||||
int blob_want_added;
|
||||
int broadcasts_changed;
|
||||
} callbacks;
|
||||
} tf_ssb_stats_t;
|
||||
|
||||
tf_ssb_t* tf_ssb_create(uv_loop_t* loop, JSContext* context, sqlite3* db, const char* secrets_path);
|
||||
void tf_ssb_destroy(tf_ssb_t* ssb);
|
||||
|
||||
@ -114,3 +131,5 @@ void tf_ssb_connection_rpc_send(tf_ssb_connection_t* connection, uint8_t flags,
|
||||
void tf_ssb_connection_add_request(tf_ssb_connection_t* connection, int32_t request_number, tf_ssb_rpc_callback_t* callback, void* user_data);
|
||||
|
||||
JSClassID tf_ssb_get_connection_class_id();
|
||||
|
||||
void tf_ssb_get_stats(tf_ssb_t* ssb, tf_ssb_stats_t* out_stats);
|
||||
|
Reference in New Issue
Block a user