Commit Graph

15 Commits

Author SHA1 Message Date
Charles Kerr 948f597d15
refactor: buffer snake case (#4682) 2023-01-27 20:12:09 -06:00
Charles Kerr c75f9a4a7a
refactor: tidy libtransmission symbol visibility (#4680) 2023-01-27 14:25:08 -06:00
Charles Kerr c81d0b130c
refactor: add tr_error_set_from_errno() (#4662) 2023-01-25 12:20:10 -06:00
Charles Kerr 1402cb2949
refactor: add TR_CONSTEXPR20 to make future C++20 migration easier (#4457) 2022-12-23 15:21:40 -06:00
Charles Kerr 28b12f091f
perf: remove libtransmission::Buffer.vecs() (#4401)
Its two calls to evbuffer_peek() used 3.5% of CPU use (measured with perf
when built with RelWithDebInfo). I added vecs() so that libtransmsision
could send noncontiguous buffers via utp_writev(); but in my testing, all
the buffers being sent are contiguous and so this is unnecessary work.
2022-12-18 12:09:02 -06:00
Charles Kerr e6d75a4b77
refactor: tr_peerIo (#4372) 2022-12-16 01:23:12 -06:00
Charles Kerr 0efb96124b
perf: remove cpu bottleneck in tr_peerIo::write() (#4258) 2022-11-27 20:46:03 -06:00
Charles Kerr 43c57fb02a
perf: buffer iterators (#4220) 2022-11-21 23:54:28 -06:00
Charles Kerr 76bea25f6e
perf: minor perf wins (#4216)
* perf: faster tr_buffer::toString()

* perf: faster tr_buffer::Iterator

* perf: get mutex lock in reconnectPulse() instead of closeBadPeers()
2022-11-21 09:28:46 -06:00
Charles Kerr 4d8509c180
refactor: add libtransmission::evhelpers (#4104) 2022-11-06 15:11:30 -06:00
Charles Kerr cdf817f2e7
fix: FTBFS on Windows (#4036)
* refactor: getPiececLength() now returns size_t

* refactor: tr_torrentSetMetadataPiece() length arg is now size_t

* refactor: tr_peerIo::flushOutgoingProtocolMsgs() returns size_t, takes a tr_error** for reporting errors

* refactor: define tr_mode_t for convenience

* fix: suseconds_t portability fix
2022-10-28 19:12:37 -05:00
Charles Kerr 798e873b87
fix: sonarcloud warnings (#4023) 2022-10-24 22:13:09 -05:00
Charles Kerr b32f3e0a24
refactor: add tr_address::toCompact() (#4014)
* refactor: add tr_address::toCompact()

* test: use the theory.org compact ipv4/6 examples in NetTest.compact4, NetTest.compact6

* refactor: add tr_address::toCompact()

* test: add toCompact, fromCompact tests

* refactor: add compact <--> sockaddr_storage conversion
2022-10-24 13:40:12 -05:00
Charles Kerr d191a04228
refactor: decouple tr_announcer_udp (#4002) 2022-10-21 13:15:14 -05:00
Charles Kerr 450f1dcadc
refactor: extract `tr_buffer` class from `tr_peerIo` (#3986) 2022-10-19 11:42:08 -05:00