first commit
[libutp-c.git] / utp_config.h
blob0ab978041eb34f37450a56f78e1c46e223144522
1 #define CCONTROL_TARGET (100 * 1000) /* us */
2 #define RATE_CHECK_INTERVAL 10000 /* ms */
3 #define DYNAMIC_PACKET_SIZE_ENABLED false
4 #define DYNAMIC_PACKET_SIZE_FACTOR 2
5 /* This should return the global number of bytes sent, used for determining dynamic
6 packet size based on rate */
8 #warning implement this in libtransmission
9 uint64 UTP_GetGlobalUTPBytesSent(const struct sockaddr *remote, socklen_t remotelen)
11 (void)remote;
12 (void)remotelen;
13 return 0;
16 enum bandwidth_type_t {
17 payload_bandwidth, connect_overhead,
18 close_overhead, ack_overhead,
19 header_overhead, retransmit_overhead
22 #ifdef WIN32
23 #define I64u "%I64u"
24 #else
25 #define I64u "%Lu"
26 #endif
27 #ifdef WIN32
28 #define snprintf _snprintf
29 #endif
31 #define g_log_utp 0
32 #define g_log_utp_verbose 0
33 /*#include <stdarg.h>*/
34 void utp_log(char const* fmt, ...)
36 (void)fmt;
37 /*printf("[%u] ", UTP_GetMilliseconds());
38 va_list vl;
39 va_start(vl, fmt);
40 vprintf(fmt, vl);
41 va_end(vl);
42 puts("");
43 fflush(stdout);*/