Subscribe and receive notification of an execution of a resource.
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#define CLIENT_IPC_PORT (12345)
#define CLIENT_IPC_ADDRESS "127.0.0.1"
#define SERVER_IPC_PORT (54321)
#define SERVER_IPC_ADDRESS "127.0.0.2"
#define CLIENT_ID "TestClient1"
#define OPERATION_PERFORM_TIMEOUT 1000
{
const char * userData = (const char *)context;
printf("Callback received. Context = %s\n", userData);
printf(
"Resource executed [%zu bytes payload]\n", arguments->
Size);
}
int main(void)
{
const char * userData = "My custom data";
(void *)userData);
sleep(1);
return 0;
}