diff options
author | irungentoo <irungentoo@gmail.com> | 2013-06-27 20:59:16 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-06-27 20:59:16 -0400 |
commit | 457feeed0b49a83b8244d0046e0daf3a632fc092 (patch) | |
tree | 691ded6a719cbb97ed3be797bd7b3b1a6e1cfd65 /testing | |
parent | 3986206de89f7094ba1300e72a7a46916bae7ff4 (diff) |
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.
Diffstat (limited to 'testing')
-rw-r--r-- | testing/Lossless_UDP_testclient.c | 13 | ||||
-rw-r--r-- | testing/Lossless_UDP_testserver.c | 2 |
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 | } |