This commit is contained in:
2026-05-03 17:17:13 +02:00
parent 69b0ee6d68
commit 30253aa5b5
3 changed files with 9 additions and 8 deletions
+4 -1
View File
@@ -2,6 +2,9 @@
#include <stdint.h>
#include <pthread.h>
#include <sys/socket.h>
#include <unistd.h>
#include <stdio.h>
#define IPC_SOCKET_PATH "/tmp/ipc_demo.sock"
#define IPC_BACKLOG 1
@@ -13,7 +16,7 @@ typedef struct {
volatile int running;
ipc_client_fn handler;
pthread_t _tid; /* internal — do not touch */
const char* socket_path;
char* socket_path;
} ipc_ctx_t;
int create_ipc(ipc_ctx_t *ctx, ipc_client_fn handler, const char* socket_path);
void destroy_ipc(ipc_ctx_t *ctx);