DC++ Fileserver port

Technical discussion about the NMDC and <a href="http://dcpp.net/ADC.html">ADC</A> protocol. The NMDC protocol is documented in the <a href="http://dcpp.net/wiki/">Wiki</a>, so feel free to refer to it.

Moderator: Moderators

Locked
xCC
Posts: 2
Joined: 2003-04-24 09:36

DC++ Fileserver port

Post by xCC » 2003-04-24 09:41

Just trying to understand how DC serves its files....

It opens a port for serving files (what ever that port number may be).

What happens if the user opens 2 instances of DC++, the file server port would be in use from the first instance of the client?

How does DC++ deal with this ?

I know IRC DCC gets away with this by creating random ports.

aDe
Forum Moderator
Posts: 138
Joined: 2003-01-07 09:14
Location: SE
Contact:

Post by aDe » 2003-04-24 10:23

If you don't specify a port, it will be random. However, opening ports only happen if you are in active mode. The port doesn't just serve the file, you would need to be in the same hub as the user or the connection will be closed.

Usually the one downloading would send a $ConnectToMe command via the hub, so that the uploader actually connects to the downloader, and in the case of passive, the client sends $RevConnectToMe, causing the uploader to send a $ConnectToMe, so that the downloader connects.

DC++ will not allow you to open 2 instances, however, if you had one dc++ open and opened another, and dc++ was set to use a specified port but it was busy, dc++ would simply inform you of this and connecting to anyone wouldn't work until you changed the port in settings of the newly opened client.

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2003-04-24 10:25

if you don't enter a port,
dc++ uses a random one.

if you do enter one, and run a second instance with the same configuration. the 2nd app will show an error message.

I'm not sure what happens next though
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

xCC
Posts: 2
Joined: 2003-04-24 09:36

Post by xCC » 2003-04-24 10:28

Thanks guys!:) Makes sense. didnt know DC did random ports..everyone keeps on saying open port 412 on ur firewall.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2003-04-24 10:38

Well, those people are out of date. 412 is the default port for NMDC, but if you consult changelog.txt you'll see that DC++ went to 1412 a while ago, and in 0.20 (I believe), changed the port scheme to a random one.

Locked