source: trunk/third-party/utp_config.h

Last change on this file was 14512, checked in by mikedld, 3 years ago

Emit warning from uTP config in a more friendly way

File size: 991 bytes
Line 
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
7
8#ifdef _MSC_VER
9#pragma message("WARNING: implement this in libtransmission")
10#else
11#warning implement this in libtransmission
12#endif
13uint64 UTP_GetGlobalUTPBytesSent(const struct sockaddr *remote, socklen_t remotelen) { return 0; }
14
15enum bandwidth_type_t {
16        payload_bandwidth, connect_overhead,
17        close_overhead, ack_overhead,
18        header_overhead, retransmit_overhead
19};
20
21#ifdef _WIN32
22#define I64u "%I64u"
23#else
24#define I64u "%Lu"
25#endif
26#ifdef _WIN32
27#define snprintf _snprintf
28#endif
29
30#define g_log_utp 0
31#define g_log_utp_verbose 0
32void utp_log(char const* fmt, ...)
33{
34        /*
35        printf("[%u] ", UTP_GetMilliseconds());
36        va_list vl;
37        va_start(vl, fmt);
38        vprintf(fmt, vl);
39        va_end(vl);
40        puts("");
41        fflush(stdout);
42        */
43};
Note: See TracBrowser for help on using the repository browser.