summaryrefslogtreecommitdiff
path: root/testing/Lossless_UDP_testclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'testing/Lossless_UDP_testclient.c')
-rw-r--r--testing/Lossless_UDP_testclient.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/testing/Lossless_UDP_testclient.c b/testing/Lossless_UDP_testclient.c
index 78aff1a3..7efafa4f 100644
--- a/testing/Lossless_UDP_testclient.c
+++ b/testing/Lossless_UDP_testclient.c
@@ -120,20 +120,23 @@ void printconnection(int connection_id)
120/*run doLossless_UDP(); */ 120/*run doLossless_UDP(); */
121void Lossless_UDP() 121void Lossless_UDP()
122{ 122{
123 IP_Port ip_port; 123/* IP_Port ip_port;
124 uint8_t data[MAX_UDP_PACKET_SIZE]; 124 uint8_t data[MAX_UDP_PACKET_SIZE];
125 uint32_t length; 125 uint32_t length;
126 while (receivepacket(&ip_port, data, &length) != -1) { 126 while (receivepacket(&ip_port, data, &length) != -1) {
127 printf("packet with length: %u\n", length); 127 printf("packet with length: %u\n", length); */
128 /* if(rand() % 3 != 1)//add packet loss 128 /* if(rand() % 3 != 1)//add packet loss
129 { */ 129 { */
130/*
130 if (LosslessUDP_handlepacket(data, length, ip_port)) 131 if (LosslessUDP_handlepacket(data, length, ip_port))
131 printpacket(data, length, ip_port); 132 printpacket(data, length, ip_port);
132 else 133 else
133 printf("Received handled packet with length: %u\n", length); //printconnection(0); 134 printf("Received handled packet with length: %u\n", length); //printconnection(0); */
134 135
135 /* } */ 136 /* } */
136 } 137 /* }*/
138
139 networking_poll();
137 140
138 doLossless_UDP(); 141 doLossless_UDP();
139 142
@@ -181,6 +184,7 @@ int main(int argc, char *argv[])
181 } 184 }
182 timer = current_time(); 185 timer = current_time();
183 186
187 LosslessUDP_init();
184 188
185 /*read first part of file */ 189 /*read first part of file */
186 read = fread(buffer, 1, 512, file); 190 read = fread(buffer, 1, 512, file);