summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/Lossless_UDP_testclient.c13
-rw-r--r--testing/Lossless_UDP_testserver.c2
2 files changed, 9 insertions, 6 deletions
diff --git a/testing/Lossless_UDP_testclient.c b/testing/Lossless_UDP_testclient.c
index 241f5bdc..bd4b1e23 100644
--- a/testing/Lossless_UDP_testclient.c
+++ b/testing/Lossless_UDP_testclient.c
@@ -68,12 +68,15 @@ int main(int argc, char *argv[])
68 uint64_t timer = current_time(); 68 uint64_t timer = current_time();
69 while(1) 69 while(1)
70 { 70 {
71 if(is_connected(connection) != 2) 71
72 if(is_connected(connection) == 3)
72 { 73 {
73 if(is_connected(connection) == 1) 74 printf("Connecting took: %llu us", (unsigned long long)(current_time() - timer));
74 { 75 break;
75 printf("Connecting took: %llu us", (unsigned long long)(current_time() - timer)); 76 }
76 } 77 if(is_connected(connection) == 0)
78 {
79 printf("Connection timeout after: %llu us", (unsigned long long)(current_time() - timer));
77 break; 80 break;
78 } 81 }
79 c_sleep(1); 82 c_sleep(1);
diff --git a/testing/Lossless_UDP_testserver.c b/testing/Lossless_UDP_testserver.c
index 9816b8b0..c898d887 100644
--- a/testing/Lossless_UDP_testserver.c
+++ b/testing/Lossless_UDP_testserver.c
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
76 connection = incoming_connection(); 76 connection = incoming_connection();
77 if(connection != -1) 77 if(connection != -1)
78 { 78 {
79 if(is_connected(connection) == 1) 79 if(is_connected(connection) == 3)
80 { 80 {
81 printf("Recieved the connection."); 81 printf("Recieved the connection.");
82 } 82 }