Expose stream load and network APIs with C linkage
This commit is contained in:
1 parent
695741d9d3
commit
bee7bdaa70
3 files changed
+21
No files matched your search
@@ -7,6 +7,10 @@
|
||||
|
||||
#include "stream_proto.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define STREAM_LOAD_PERIOD_MS 200
|
||||
#define STREAM_LOAD_HISTORY 50
|
||||
#define STREAM_LOAD_CONFIRM_MS 500
|
||||
@@ -38,4 +42,7 @@ int stream_load_add(struct stream_load *load, uint64_t packets, uint64_t bytes);
|
||||
int stream_load_remove(struct stream_load *load, uint64_t packets, uint64_t bytes, int sent);
|
||||
void stream_load_changed(struct stream_load *load);
|
||||
int stream_load_poll(struct stream_load *load, uint64_t now_ms, uint64_t oldest_age_ms, struct stream_load_snapshot *snapshot);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -9,6 +9,10 @@
|
||||
#include "stream_wire.h"
|
||||
#include "stream_load.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct stream_network;
|
||||
struct STREAM_RECEIVE;
|
||||
enum stream_receive_state { STREAM_RECEIVE_CONNECTING, STREAM_RECEIVE_INFO, STREAM_RECEIVE_REQUESTED,
|
||||
@@ -47,4 +51,7 @@ void stream_network_cancel(struct stream_network *network, const struct stream_d
|
||||
void stream_network_membership_changed(struct stream_network *network, uint64_t node_id, const char *channel);
|
||||
void stream_network_cache_event(struct stream_network *network, const struct stream_descriptor *descriptor,
|
||||
const uint8_t *wire, size_t length, int added);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -6,6 +6,10 @@
|
||||
#include "stream_proto.h"
|
||||
#include "stream_metrics.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define STREAM_WIRE_VERSION 2
|
||||
#define STREAM_WIRE_HEADER 52
|
||||
#define STREAM_PATH_MAX 32
|
||||
@@ -48,4 +52,7 @@ int stream_metric_read(const uint8_t *wire, struct stream_metric_snapshot *snaps
|
||||
int stream_end_sign(const struct stream_descriptor *descriptor, uint64_t last, const uint8_t key[32], uint8_t wire[STREAM_END_SIZE]);
|
||||
int stream_end_verify(const struct stream_descriptor *descriptor, const uint8_t key[32], const uint8_t *wire, size_t length,
|
||||
uint64_t *last);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Reference in new issue
Block a user