11 lines
478 B
C
11 lines
478 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
typedef struct { uint64_t (*now_ms)(void *context); void *context; } app_clock_t;
|
|
typedef struct { uint32_t (*next_u32)(void *context); void *context; } random_source_t;
|
|
typedef struct { bool (*schedule_after_ms)(void *context, uint32_t delay_ms); void *context; } scheduler_t;
|
|
typedef struct { bool (*send)(void *context, int client_id, const char *data, size_t length); void *context; } transport_t;
|