mirror of
https://github.com/transmission/transmission
synced 2024-12-23 16:24:02 +00:00
43 lines
991 B
C
43 lines
991 B
C
#define CCONTROL_TARGET (100 * 1000) // us
|
|
#define RATE_CHECK_INTERVAL 10000 // ms
|
|
#define DYNAMIC_PACKET_SIZE_ENABLED false
|
|
#define DYNAMIC_PACKET_SIZE_FACTOR 2
|
|
// This should return the global number of bytes sent, used for determining dynamic
|
|
// packet size based on rate
|
|
|
|
#ifdef _MSC_VER
|
|
#pragma message("WARNING: implement this in libtransmission")
|
|
#else
|
|
#warning implement this in libtransmission
|
|
#endif
|
|
uint64 UTP_GetGlobalUTPBytesSent(const struct sockaddr *remote, socklen_t remotelen) { return 0; }
|
|
|
|
enum bandwidth_type_t {
|
|
payload_bandwidth, connect_overhead,
|
|
close_overhead, ack_overhead,
|
|
header_overhead, retransmit_overhead
|
|
};
|
|
|
|
#ifdef _WIN32
|
|
#define I64u "%I64u"
|
|
#else
|
|
#define I64u "%Lu"
|
|
#endif
|
|
#ifdef _WIN32
|
|
#define snprintf _snprintf
|
|
#endif
|
|
|
|
#define g_log_utp 0
|
|
#define g_log_utp_verbose 0
|
|
void utp_log(char const* fmt, ...)
|
|
{
|
|
/*
|
|
printf("[%u] ", UTP_GetMilliseconds());
|
|
va_list vl;
|
|
va_start(vl, fmt);
|
|
vprintf(fmt, vl);
|
|
va_end(vl);
|
|
puts("");
|
|
fflush(stdout);
|
|
*/
|
|
};
|