summaryrefslogtreecommitdiffstats
path: root/test-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'test-client.c')
-rw-r--r--test-client.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/test-client.c b/test-client.c
index 0a318f1..5c78d42 100644
--- a/test-client.c
+++ b/test-client.c
@@ -4,10 +4,16 @@
#include "kiro-client.h"
-int main(void)
+int main ( int argc, char *argv[] )
{
+ if (argc < 3)
+ {
+ printf("Not enough aruments. Usage: ./client <address> <port>\n");
+ return -1;
+ }
KiroClient *client = g_object_new(KIRO_TYPE_CLIENT, NULL);
- kiro_client_connect(client, "192.168.11.61", "60010");
- kiro_client_sync(client);
- return 0;
+ if(-1 != kiro_client_connect(client, argv[1], argv[2]))
+ kiro_client_sync(client);
+ g_object_unref(client);
+ return 0;
} \ No newline at end of file