Lines 204-210
void utp_read(void* socket, const byte*
Link Here
|
204 |
void utp_write(void* socket, byte* bytes, size_t count) |
204 |
void utp_write(void* socket, byte* bytes, size_t count) |
205 |
{ |
205 |
{ |
206 |
assert(utp_socket == socket); |
206 |
assert(utp_socket == socket); |
207 |
printf("utp on_write %u\n", count); |
207 |
printf("utp on_write %zu\n", count); |
208 |
assert(false); |
208 |
assert(false); |
209 |
} |
209 |
} |
210 |
|
210 |
|
Lines 364-375
int main(int argc, char* argv[])
Link Here
|
364 |
float rate = (total_recv - last_recv) * 1000.f / (cur_time - last_time); |
364 |
float rate = (total_recv - last_recv) * 1000.f / (cur_time - last_time); |
365 |
last_recv = total_recv; |
365 |
last_recv = total_recv; |
366 |
last_time = cur_time; |
366 |
last_time = cur_time; |
367 |
printf("\r[%u] recv: %d %.1f bytes/s ", cur_time, total_recv, rate); |
367 |
printf("\r[%u] recv: %zd %.1f bytes/s ", cur_time, total_recv, rate); |
368 |
fflush(stdout); |
368 |
fflush(stdout); |
369 |
} |
369 |
} |
370 |
} |
370 |
} |
371 |
|
371 |
|
372 |
printf("\nreceived: %d bytes\n", total_recv); |
372 |
printf("\nreceived: %zd bytes\n", total_recv); |
373 |
fclose(file); |
373 |
fclose(file); |
374 |
fclose(log_file); |
374 |
fclose(log_file); |
375 |
} |
375 |
} |