-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuds_blocking.h
More file actions
26 lines (18 loc) · 769 Bytes
/
uds_blocking.h
File metadata and controls
26 lines (18 loc) · 769 Bytes
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
#pragma once
#include "benchmark.h"
#include <stdbool.h>
struct UDSBlockingState {
int fd;
bool is_server;
};
typedef struct UDSBlockingState UDSBlockingState;
/* Setup Unix Domain Socket server */
UDSBlockingState* setup_uds_blocking_server(const char* socket_path);
/* Setup Unix Domain Socket client */
UDSBlockingState* setup_uds_blocking_client(const char* socket_path);
/* Free Unix Domain Socket resources */
void free_uds_blocking(UDSBlockingState* state);
/* Run the Unix Domain Socket server benchmark */
void run_uds_blocking_server(UDSBlockingState* state, int duration_secs, float work_secs);
/* Run the Unix Domain Socket client benchmark */
void run_uds_blocking_client(UDSBlockingState* state, int duration_secs, BenchmarkStats* stats);