Archived

This topic is now archived and is closed to further replies.

jch

uTP

Recommended Posts

When performing an active connection open, how does uTorrent decide whether to contact a peer using uTP or TCP? Does it just try uTP, and fall back to TCP after a timeout?

--Juliusz

Share this post


Link to post
Share on other sites

You couldn't possibly be more unhelpful, could you?

I'll try to be more precise:

1. How does my BitTorrent implementation ensure that µTorrent never attempts to contact me over µTP?

2. If (1) is not possible, I'm probably going to receive µTP datagrams on my DHT port. How do I reply to those datagrams so that µTorrent contacts me over TCP straight away without waiting for a timeout?

--Juliusz

Share this post


Link to post
Share on other sites

You cannot fully control what OTHERS use to try to contact you on the first try. And if they're set up to use uTP only, they'll continue to retry ONLY using uTP.

How you have bt.transp_disposition set decides how your end responds or makes uTP.

Share this post


Link to post
Share on other sites
[20:04:14] <&alus> it tries both at the same time

[20:04:19] <&alus> and keeps uTP if both exist

...

[20:05:46] <&alus> connecting doesn't eat significant bandwidth

So I guess you can't prevent it, but you don't need to do anything specific either -- just ignore the uTP packets, and µTorrent will continue to use TCP.

Share this post


Link to post
Share on other sites

I have bt.transp_disposition set to 10. Should I set maximum upload rate to 0 (unlimited)?

Share this post


Link to post
Share on other sites

> So I guess you can't prevent it, but you don't need to do anything specific either -- just ignore the uTP packets, and µTorrent will continue to use TCP.

Shouldn't µTorrent define a "µTP not handled, please contact me using TCP" message, so that a non-µTP peer can send this to avoid having to wait for µTorrent's timeout?

--Juliusz

Share this post


Link to post
Share on other sites

Maybe I'm not understanding your question... but why would you need to wait for a timeout in the first place? They are attempted simultaneously, as in simultaneously. If the client supports TCP only, then all it needs to do is accept the TCP connection, and ignore the uTP connection attempt -- no waiting involved, because they both come around the same time anyway. µTorrent will accept the TCP connection just the same.

If a uTP-supporting client receives/establishes the TCP first, and receives the uTP attempt later (odd latency issue or whatever), it can still respond to the uTP connection, and the TCP connection gets "upgraded" to uTP (the already-established TCP connection can be dropped, and uTP can be used instead).

Share this post


Link to post
Share on other sites

> [µTP and TCP] are attempted simultaneously

Ah, okay, that was the bit I was missing. I assumed that µTorrent first tried µTP, and waited for a timeout before falling back to TCP.

Thanks for the info.

Share this post


Link to post
Share on other sites