diff options
Diffstat (limited to 'components/wisp_relay/relay_core.h')
| -rw-r--r-- | components/wisp_relay/relay_core.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/components/wisp_relay/relay_core.h b/components/wisp_relay/relay_core.h new file mode 100644 index 0000000..d8e7096 --- /dev/null +++ b/components/wisp_relay/relay_core.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | #ifndef RELAY_CORE_H | ||
| 2 | #define RELAY_CORE_H | ||
| 3 | |||
| 4 | #include <stdint.h> | ||
| 5 | |||
| 6 | #include "ws_server.h" | ||
| 7 | |||
| 8 | typedef struct sub_manager sub_manager_t; | ||
| 9 | typedef struct storage_engine storage_engine_t; | ||
| 10 | typedef struct rate_limiter rate_limiter_t; | ||
| 11 | |||
| 12 | typedef struct relay_ctx { | ||
| 13 | ws_server_t ws_server; | ||
| 14 | sub_manager_t *sub_manager; | ||
| 15 | storage_engine_t *storage; | ||
| 16 | rate_limiter_t *rate_limiter; | ||
| 17 | |||
| 18 | struct { | ||
| 19 | uint16_t port; | ||
| 20 | uint32_t max_event_age_sec; | ||
| 21 | uint8_t max_subs_per_conn; | ||
| 22 | uint8_t max_filters_per_sub; | ||
| 23 | int64_t max_future_sec; | ||
| 24 | } config; | ||
| 25 | } relay_ctx_t; | ||
| 26 | |||
| 27 | #endif | ||