This forum has been archived. All content is frozen. Please use KDE Discuss instead.

incoming connections

Tags: None
(comma "," separated)
lucke
Registered Member
Posts
205
Karma
0

incoming connections

Wed May 09, 2007 8:59 pm
Arr, I'm a bit dazzled here.

I wanted to implement some kind of a feedback when there are no incoming connections (i.e. port isn't forwarded). However, I can't seem to differentiate between incoming connections and those originated by ktorrent. Hints?
George
Moderator
Posts
5421
Karma
1

Sat May 12, 2007 1:10 pm
We don't keep track wether a Peer was an incoming connection or an outgoing. However the authentication is done in separate classes.
lucke
Registered Member
Posts
205
Karma
0

Sat May 12, 2007 1:41 pm
Hym, is there a way to check whether port is forwarded then (from within ktorrent)?
imported4-Ivan
Registered Member
Posts
819
Karma
0

Sat May 12, 2007 5:28 pm
You can place a check in ServerAuthenticate class. If we receive at least one incoming connection - ports are OK.

Also look for Authenticate(S):xxx.xxx.xxx.xxx message in the log file. It indicates an incoming connection
lucke
Registered Member
Posts
205
Karma
0

Sun May 13, 2007 4:12 pm
Here's a patch which adds a message in lower left corner when there are no incoming connections. The only problem is that it could fight for place with search messages - maybe putting it above the statusbar on the right would be a good idea, although it is probably better visible on its current location. Anyhow, it disappears when there are incoming connections, so it shouldn't bother anyone on a properly set up firewall.

Apply to r663929, although should work with any other.
George
Moderator
Posts
5421
Karma
1

Mon May 14, 2007 7:13 pm
I haven't got the time to look it at it today, but it's the first thing I'm gonna do tomorrow.
George
Moderator
Posts
5421
Karma
1

Tue May 15, 2007 5:46 pm
The patch works, but can't we think of some better way to test this ? One that isn't dependant on seeing incoming connections which might take some time.
lucke
Registered Member
Posts
205
Karma
0

Tue May 15, 2007 6:36 pm
The only thing that springs to mind is checking the port externally (from some server), but that's not very feasible nor reliable.

qbittorrent checks for incoming connections too, can't say about azureus, currently I'm unable to download the source code.

Even on a torrent with 1 seed and 8 peers I get incoming connections promptly after starting, so it shouldn't be that much of an issue. One thing I think is worth considering is disabling that message when there is no active torrents - but then, some might overlook it.

All in all, I think this feature can be especially beneficial to less computer-savvy of us, who complain that downloads on ktorrent are slow and they don't have their ports open/forwarded ;-) Even if you have everything set up properly, something might screw up some time and without that you won't even notice something is wrong.
George
Moderator
Posts
5421
Karma
1

Thu May 17, 2007 7:35 am
I will add it, but hide it when there are no running torrents.
George
Moderator
Posts
5421
Karma
1

Thu May 17, 2007 7:54 am
OK, it is committed.
lucke
Registered Member
Posts
205
Karma
0

Thu May 17, 2007 8:56 am
Nice.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot]