Files
2022-12-13 12:44:04 +01:00

22 lines
449 B
C++
Executable File

// Simple program to shutdown the rsvcServer
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <rsvcClient.h>
int main (int argc, char** argv)
{
if (argc < 3) {
fprintf (stderr, "Usage: %s host port\n", argv[0]);
exit (1);
}
rsvcClient client;
if (client.connect (argv[1], atoi (argv[2])) != RSVC_SUCCESS) {
fprintf (stderr, "Cannot connect to rsvcServer\n");
exit (1);
}
client.shutdownServer ();
}