Client/Server example using C++ infrastructure – Client implementation.
#include <stdio.h>
#include "shared.h"
int
main()
{
{
printf("Could not get server capability!\n");
return 1;
}
printf("Asking for %d - %d\n", val1, val2);
if (server->sub(val1, val2, &val1))
{
printf("Error talking to server\n");
return 1;
}
printf("Result of substract call: %d\n", val1);
printf("Asking for -%d\n", val1);
if (server->neg(val1, &val1))
{
printf("Error talking to server\n");
return 1;
}
printf("Result of negate call: %d\n", val1);
return 0;
}