From 457feeed0b49a83b8244d0046e0daf3a632fc092 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Thu, 27 Jun 2013 20:59:16 -0400 Subject: Added current work on Lossless_UDP (Not done do not test it yet) Lossless_UDP code is probably filled with problems right now. this is normal. --- testing/Lossless_UDP_testclient.c | 13 ++++++++----- testing/Lossless_UDP_testserver.c | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'testing') 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[]) uint64_t timer = current_time(); while(1) { - if(is_connected(connection) != 2) + + if(is_connected(connection) == 3) { - if(is_connected(connection) == 1) - { - printf("Connecting took: %llu us", (unsigned long long)(current_time() - timer)); - } + printf("Connecting took: %llu us", (unsigned long long)(current_time() - timer)); + break; + } + if(is_connected(connection) == 0) + { + printf("Connection timeout after: %llu us", (unsigned long long)(current_time() - timer)); break; } 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[]) connection = incoming_connection(); if(connection != -1) { - if(is_connected(connection) == 1) + if(is_connected(connection) == 3) { printf("Recieved the connection."); } -- cgit v1.2.3