Jordan Lee
f00799f80c
if we successfully finish a handshake using uTP, mark the peer as supporting uTP
2011-02-18 00:41:06 +00:00
Jordan Lee
75badcd4ab
silence compiler warning
2011-02-18 00:40:53 +00:00
Jordan Lee
71486f8c86
call UTP_RBDrained when our read buffer is empty
2011-02-18 00:40:38 +00:00
Jordan Lee
e4b4812caa
add dbgmsg statements to peer-io's uTP code
2011-02-18 00:40:22 +00:00
Jordan Lee
9626aa4506
uTP peers need tr_peerIoFlush() to work during the handshake phase.
2011-02-18 00:40:01 +00:00
Jordan Lee
f6a85cb16b
implement bandwidth limiting for uploads to uTP peers
2011-02-18 00:39:33 +00:00
Juliusz Chroboczek
3c56dbea2a
Remove more debugging messages.
2011-02-18 00:36:36 +00:00
Juliusz Chroboczek
f33a772b00
Call didWriteWrapper in utp_on_write.
2011-02-18 00:36:33 +00:00
Juliusz Chroboczek
e35d1aacaf
Don't propagate information about ut_holepunch over PEX.
...
It's not useful, says Greg.
2011-02-18 00:36:31 +00:00
Juliusz Chroboczek
c9c2ad7c57
Don't use read_enabled in get_rb_size.
...
We're no longer maintaining read_enabled, as there are simpler ways of
doing the same. Additionally, we used RBDrained incorrectly.
2011-02-18 00:36:27 +00:00
Juliusz Chroboczek
77c034122e
Revert "Maintain information about enabled/disabled I/O."
...
This reverts commit 604f8fd10db747e57d8710cc53326c0e114ad32c.
2011-02-18 00:36:24 +00:00
Juliusz Chroboczek
c9a7becf87
Remove debugging messages.
2011-02-18 00:36:21 +00:00
Juliusz Chroboczek
88f4eac81f
Implement outgoing uTP connections.
2011-02-18 00:36:19 +00:00
Juliusz Chroboczek
456dbdd935
Export uTP send_to callback.
2011-02-18 00:36:16 +00:00
Juliusz Chroboczek
11114a74c0
Fix peerIoReconnect for uTP sockets.
2011-02-18 00:36:12 +00:00
Juliusz Chroboczek
dae7db8e10
Implement pacing of reads.
...
This should cause uTP sockets to respect read bandwidth limits. I'm not so
sure about the values we return for the read buffer size -- perhaps we
should allow some slack for network latency?
2011-02-18 00:36:09 +00:00
Juliusz Chroboczek
d347f5ada4
Maintain information about enabled/disabled I/O.
2011-02-18 00:36:07 +00:00
Juliusz Chroboczek
236fb3d9d6
Set the read buffer of UTP sockets to a well-defined value.
2011-02-18 00:36:05 +00:00
Juliusz Chroboczek
80677b3730
Compute accurate overhead for uTP packets.
2011-02-18 00:36:02 +00:00
Juliusz Chroboczek
51bc8d8b80
Push testig for UTP enabled further down.
...
There's no need to test for DHT/uTP being enabled in tr-udp. The DHT
will silently discard any packets directed at the wrong session (see the
beginning of dhtCallback). As to uTP, we need to grok uTP packets
to close any remaining connections after we disabled uTP, so it's better
to participate in uTP, just reject any incoming connections.
2011-02-18 00:35:56 +00:00
Juliusz Chroboczek
4f50c5dda4
Fix typo.
2011-02-18 00:35:54 +00:00
Jordan Lee
9dca338032
make a note that we need to implement UTP_GetGlobalUTPBytesSent in libtransmission
2011-02-18 00:33:54 +00:00
Jordan Lee
3f1b060241
(trunk T) add preliminary enable/disable toggles in daemon, gtk, and qt clients. 'preliminary' because this may be widened to a tri-state of inabled, disabled, and incoming only
2011-02-18 00:33:29 +00:00
Jordan Lee
c4b1d1e6c5
(trunk libT) add C and RPC API for getting/setting uTP enabled flag
2011-02-18 00:33:11 +00:00
Jordan Lee
3a7806a7cc
(trunk libT) silence compiler warnings
2011-02-18 00:32:39 +00:00
Jordan Lee
7df7d34f6d
automake/autoconf; #includes in libtransmission
2011-02-18 00:32:19 +00:00
Jordan Lee
01f5a8b093
import libutp into third-party/ and plug it in to autoconf, automake
2011-02-18 00:31:49 +00:00
Juliusz Chroboczek
130006fcb1
Propagate uTP and ut_holepunch information over PEX.
2011-02-18 00:24:48 +00:00
Juliusz Chroboczek
5a2710c9da
Use dummy callbacks in peerIoReconnect.
2011-02-18 00:24:45 +00:00
Juliusz Chroboczek
44e6e4a8f2
Tweak dummy callbacks.
...
Don't abort, just log a message and continue.
2011-02-18 00:24:40 +00:00
Juliusz Chroboczek
4d5f8dbb92
Don't call UTP_Close multiple times.
...
Greg says it's evil.
2011-02-18 00:24:36 +00:00
Juliusz Chroboczek
bd0ea13701
(gtk) Add tooltip for uTP peers.
2011-02-18 00:24:33 +00:00
Juliusz Chroboczek
eb715e8018
Shutdown UTP socket on short write.
2011-02-18 00:24:30 +00:00
Juliusz Chroboczek
c9bbab05ee
Schedule a uTP write in peerIoWriteBuf.
2011-02-18 00:24:28 +00:00
Juliusz Chroboczek
1090e5a262
Complete the uTP callbacks.
2011-02-18 00:24:22 +00:00
Juliusz Chroboczek
6313eb4703
Add dummy UTP callbacks.
...
Libutp will sometimes call our callbacks after we called UTP_Close,
notably to notify us of the UTP_STATE_DESTROYING state change, but
also, for some reason, to ask us about our read buffer. The simplest
way to avoid issues with that is to switch to a second set of callbacks.
2011-02-18 00:24:18 +00:00
Juliusz Chroboczek
5563729d61
Add assertions to libevent callbacks.
...
They should never be called with a UTP socket.
2011-02-18 00:24:15 +00:00
Juliusz Chroboczek
18f1ddb7aa
First pass at uTP callbacks.
2011-02-18 00:24:13 +00:00
Juliusz Chroboczek
1cfa2ac38b
Update tr-utp.c to be compatible with libevent2.
2011-02-18 00:24:11 +00:00
Juliusz Chroboczek
5ad27d82cf
Fix io_dtor for uTP sockets.
2011-02-18 00:24:09 +00:00
Juliusz Chroboczek
87d1f5ca34
Check for UTP timeouts every 50ms or so.
...
Greg says that works for them.
2011-02-18 00:24:04 +00:00
Juliusz Chroboczek
7741151c48
Accept UTP connexions.
2011-02-18 00:23:58 +00:00
Juliusz Chroboczek
8599d7c037
Modify peer-io to work with UTP sockets.
...
This is not supposed to work yet -- it just adds new fields to the data
structures to get the UTP code to compile.
2011-02-18 00:23:51 +00:00
Juliusz Chroboczek
98ea0addb0
Fix incorrect use of tr_timerAdd.
2011-02-18 00:23:49 +00:00
Juliusz Chroboczek
c5e3cfecb9
Participate in UTP.
...
This adds code to participate in the UTP protocol, but without doing anything
useful yet -- we just shut down immediately any incoming connexion request.
2011-02-18 00:23:47 +00:00
Jordan Lee
ee4317600d
(trunk libT) #3767 "rarest first policy" -- disable the assertReplicationCountIsExact() assertion
2011-02-17 13:00:11 +00:00
Jordan Lee
77bdb6522d
(trunk libT) #3767 "rarest first policy" -- possible fix for assertion error reported by rolcol
...
Resolve the problem described @ https://trac.transmissionbt.com/ticket/3767#comment:38
2011-02-17 12:57:36 +00:00
Jordan Lee
4e60838434
(trunk libT) #3767 "rarest first policy" -- remove some debugging code.
...
My initial thinking was to let nightly users test this out, but it's not necessary.
2011-02-17 07:10:20 +00:00
Jordan Lee
5dffc2814d
(trunk libT) #3767 "rarest first policy" -- fixed.
...
This commit, started by a patch from athy, implements a rarest first policy when deciding which pieces to request from peers. It keeps a count of how many peers have each piece, and updates the count when getting bitfields, have, have all, and have none messages, as well as decrementing the counts when peers disconnect.
This running total is generated only for downloading torrents. Seeds don't have this overhead.
2011-02-17 05:14:53 +00:00
Jordan Lee
716a3c90c2
(trunk) #4032 "Better error detection / reporting in http announces" -- added to trunk.
...
This patch adds two new flags to the callback function -- did_connect and did_timeout -- that are calculated inside of web.c using information from libcurl. This allows the announcer to detect timeouts more accurately and also to distinguish between unresponsive peers (which get the preexisting "Tracker did not respond" error message) and unconnectable peers (which get a new error message, "Could not connect to tracker").
2011-02-17 02:26:24 +00:00