Shows how to use ArNetServer, a simple text command receiver
#include "Aria.h"
void test(
char **argv,
int argc,
ArSocket *socket)
{
int i;
printf("Client said: ");
for (i = 0; i < argc; ++i)
printf("\t%s\n", argv[i]);
printf("\n");
}
int main(int argc, char **argv)
{
if (!server.
open(NULL, 7171,
"password",
true))
{
printf("Could not open server.\n");
return 1;
}
server.
addCommand(
"test", &testCB,
"this simply prints out the command given on the server");
server.
addCommand(
"test2", &testCB,
"this simply prints out the command given on the server");
{
}
return 0;
}