-
Notifications
You must be signed in to change notification settings - Fork 1
/
aeron.h
31 lines (25 loc) · 1.09 KB
/
aeron.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#if defined(_MSC_VER)
#define AERON_CLIENT_CGO_EXPORT __declspec(dllexport)
#else
#define AERON_CLIENT_CGO_EXPORT
#endif
typedef int (*poll_handler_t)(char*, int);
AERON_CLIENT_CGO_EXPORT int aeron_initialize(char *aeron_dir);
AERON_CLIENT_CGO_EXPORT void aeron_destroy();
AERON_CLIENT_CGO_EXPORT int aeron_add_publication(char *channel, int stream_id);
AERON_CLIENT_CGO_EXPORT void aeron_remove_publication(int publication_idx);
AERON_CLIENT_CGO_EXPORT int aeron_publication_is_connected(int publication_idx);
AERON_CLIENT_CGO_EXPORT int aeron_publication_is_closed(int publication_idx);
AERON_CLIENT_CGO_EXPORT int aeron_get_streamId(int publication_idx);
AERON_CLIENT_CGO_EXPORT int aeron_get_sessionId(int publication_idx);
AERON_CLIENT_CGO_EXPORT int64_t aeron_publish(int publication_idx, char* msg, int msg_len);
AERON_CLIENT_CGO_EXPORT int aeron_add_subscription(char *channel, int stream_id);
AERON_CLIENT_CGO_EXPORT int aeron_poll(int subscription_idx, poll_handler_t handler, int sleep_mill = 0);
#ifdef __cplusplus
}
#endif