summaryrefslogtreecommitdiffstats
path: root/test-client.c
diff options
context:
space:
mode:
authorTimo Dritschler <timo.dritschler@kit.edu>2014-05-09 18:20:11 +0200
committerTimo Dritschler <timo.dritschler@kit.edu>2014-05-09 18:20:11 +0200
commitb39079922bb4288dee30dfcb89a0fa0d20e81632 (patch)
treebb9dd4bc6ec302ce696661b7066ac825866cc43c /test-client.c
parent18ae33837ee1451dddf265198b51ef3483e2029b (diff)
downloadkiro-b39079922bb4288dee30dfcb89a0fa0d20e81632.tar.gz
kiro-b39079922bb4288dee30dfcb89a0fa0d20e81632.tar.bz2
kiro-b39079922bb4288dee30dfcb89a0fa0d20e81632.tar.xz
kiro-b39079922bb4288dee30dfcb89a0fa0d20e81632.zip
Restructured kiro-server implementation to make it a bit more modular
Added interface to kiro-client to access the memory allocated for communication Added new 'kiro_destroy_connection' to kiro-rdma package Changed interface of 'kiro_destroy_connection_context' and updated server and client accordingly Started to implement a more visual testing routine in test-server Made test-client use commandline arguments for address and port Updated Makefile
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