Merge pull request #583 from aldenml/utp-log-and-typos
Revert utp log file to disable by default
This commit is contained in:
commit
65dda0ea7c
|
@ -190,7 +190,7 @@ namespace libtorrent
|
||||||
//
|
//
|
||||||
// ``orig_files()`` returns the original (unmodified) file storage for
|
// ``orig_files()`` returns the original (unmodified) file storage for
|
||||||
// this torrent. This is used by the web server connection, which needs
|
// this torrent. This is used by the web server connection, which needs
|
||||||
// to request files with the original names. Filename may be chaged using
|
// to request files with the original names. Filename may be changed using
|
||||||
// ``torrent_info::rename_file()``.
|
// ``torrent_info::rename_file()``.
|
||||||
//
|
//
|
||||||
// For more information on the file_storage object, see the separate
|
// For more information on the file_storage object, see the separate
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace libtorrent
|
||||||
// this torrent_peer. i.e. These are only updated
|
// this torrent_peer. i.e. These are only updated
|
||||||
// when the connection is closed. For the
|
// when the connection is closed. For the
|
||||||
// total amount of upload and download
|
// total amount of upload and download
|
||||||
// we'll have to add thes figures with the
|
// we'll have to add these figures with the
|
||||||
// statistics from the peer_connection.
|
// statistics from the peer_connection.
|
||||||
// since these values don't need to be stored
|
// since these values don't need to be stored
|
||||||
// with byte-precision, they specify the number
|
// with byte-precision, they specify the number
|
||||||
|
@ -115,7 +115,7 @@ namespace libtorrent
|
||||||
// this torrent_peer has
|
// this torrent_peer has
|
||||||
unsigned failcount:5; // [0, 31]
|
unsigned failcount:5; // [0, 31]
|
||||||
|
|
||||||
// incoming peers (that don't advertize their listen port)
|
// incoming peers (that don't advertise their listen port)
|
||||||
// will not be considered connectable. Peers that
|
// will not be considered connectable. Peers that
|
||||||
// we have a listen port for will be assumed to be.
|
// we have a listen port for will be assumed to be.
|
||||||
bool connectable:1;
|
bool connectable:1;
|
||||||
|
@ -188,7 +188,7 @@ namespace libtorrent
|
||||||
bool supports_holepunch:1;
|
bool supports_holepunch:1;
|
||||||
// this is set to one for web seeds. Web seeds
|
// this is set to one for web seeds. Web seeds
|
||||||
// are not stored in the policy m_peers list,
|
// are not stored in the policy m_peers list,
|
||||||
// and are excempt from connect candidate bookkeeping
|
// and are exempt from connect candidate bookkeeping
|
||||||
// so, any torrent_peer with the web_seed bit set, is
|
// so, any torrent_peer with the web_seed bit set, is
|
||||||
// never considered a connect candidate
|
// never considered a connect candidate
|
||||||
bool web_seed:1;
|
bool web_seed:1;
|
||||||
|
|
|
@ -64,10 +64,10 @@ namespace libtorrent
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TORRENT_UTP_LOG
|
#if TORRENT_UTP_LOG
|
||||||
bool is_utp_stream_logging();
|
TORRENT_EXPORT bool is_utp_stream_logging();
|
||||||
|
|
||||||
// This function should be used at the very beginning and very end of your program.
|
// This function should be used at the very beginning and very end of your program.
|
||||||
void set_utp_stream_logging(bool enable);
|
TORRENT_EXPORT void set_utp_stream_logging(bool enable);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TORRENT_EXTRA_EXPORT bool compare_less_wrap(boost::uint32_t lhs
|
TORRENT_EXTRA_EXPORT bool compare_less_wrap(boost::uint32_t lhs
|
||||||
|
@ -90,8 +90,8 @@ namespace libtorrent
|
||||||
};
|
};
|
||||||
|
|
||||||
// internal: the point of the bif_endian_int is two-fold
|
// internal: the point of the bif_endian_int is two-fold
|
||||||
// one purpuse is to not have any alignment requirements
|
// one purpose is to not have any alignment requirements
|
||||||
// so that any byffer received from the network can be cast
|
// so that any buffer received from the network can be cast
|
||||||
// to it and read as an integer of various sizes without
|
// to it and read as an integer of various sizes without
|
||||||
// triggering a bus error. The other purpose is to convert
|
// triggering a bus error. The other purpose is to convert
|
||||||
// from network byte order to host byte order when read and
|
// from network byte order to host byte order when read and
|
||||||
|
|
|
@ -159,7 +159,7 @@ namespace libtorrent
|
||||||
, source(src)
|
, source(src)
|
||||||
#if !defined(TORRENT_DISABLE_ENCRYPTION) && !defined(TORRENT_DISABLE_EXTENSIONS)
|
#if !defined(TORRENT_DISABLE_ENCRYPTION) && !defined(TORRENT_DISABLE_EXTENSIONS)
|
||||||
// assume no support in order to
|
// assume no support in order to
|
||||||
// prefer opening non-encrypyed
|
// prefer opening non-encrypted
|
||||||
// connections. If it fails, we'll
|
// connections. If it fails, we'll
|
||||||
// retry with encryption
|
// retry with encryption
|
||||||
, pe_support(false)
|
, pe_support(false)
|
||||||
|
|
|
@ -65,9 +65,7 @@ static struct utp_logger
|
||||||
FILE* utp_log_file;
|
FILE* utp_log_file;
|
||||||
mutex utp_log_mutex;
|
mutex utp_log_mutex;
|
||||||
|
|
||||||
utp_logger() : utp_log_file(NULL) {
|
utp_logger() : utp_log_file(NULL) {}
|
||||||
utp_log_file = fopen("utp.log", "w+");
|
|
||||||
}
|
|
||||||
~utp_logger()
|
~utp_logger()
|
||||||
{
|
{
|
||||||
if (utp_log_file) fclose(utp_log_file);
|
if (utp_log_file) fclose(utp_log_file);
|
||||||
|
@ -504,7 +502,7 @@ public:
|
||||||
// this is what we'll send back
|
// this is what we'll send back
|
||||||
boost::uint32_t m_reply_micro;
|
boost::uint32_t m_reply_micro;
|
||||||
|
|
||||||
// this is the advertized receive window the other end sent
|
// this is the advertised receive window the other end sent
|
||||||
// we'll never have more un-acked bytes in flight
|
// we'll never have more un-acked bytes in flight
|
||||||
// if this ever gets set to zero, we'll try one packet every
|
// if this ever gets set to zero, we'll try one packet every
|
||||||
// second until the window opens up again
|
// second until the window opens up again
|
||||||
|
@ -618,7 +616,7 @@ public:
|
||||||
// this is a counter of how many times the current m_acked_seq_nr
|
// this is a counter of how many times the current m_acked_seq_nr
|
||||||
// has been ACKed. If it's ACKed more than 3 times, we assume the
|
// has been ACKed. If it's ACKed more than 3 times, we assume the
|
||||||
// packet with the next sequence number has been lost, and we trigger
|
// packet with the next sequence number has been lost, and we trigger
|
||||||
// a re-send. Ovbiously an ACK only counts as a duplicate as long as
|
// a re-send. Obviously an ACK only counts as a duplicate as long as
|
||||||
// we have outstanding packets following it.
|
// we have outstanding packets following it.
|
||||||
boost::uint8_t m_duplicate_acks;
|
boost::uint8_t m_duplicate_acks;
|
||||||
|
|
||||||
|
@ -680,7 +678,7 @@ public:
|
||||||
// this is true while the socket is in slow start mode. It's
|
// this is true while the socket is in slow start mode. It's
|
||||||
// only in slow-start during the start-up phase. Slow start
|
// only in slow-start during the start-up phase. Slow start
|
||||||
// (contrary to what its name suggest) means that we're growing
|
// (contrary to what its name suggest) means that we're growing
|
||||||
// the congestion window (cwnd) exponetially rather than linearly.
|
// the congestion window (cwnd) exponentially rather than linearly.
|
||||||
// this is done at startup of a socket in order to find its
|
// this is done at startup of a socket in order to find its
|
||||||
// link capacity faster. This behaves similar to TCP slow start
|
// link capacity faster. This behaves similar to TCP slow start
|
||||||
bool m_slow_start:1;
|
bool m_slow_start:1;
|
||||||
|
|
Loading…
Reference in New Issue