more stuff on getting lock/pk

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
dieselmachine
Posts: 36
Joined: 2003-01-19 22:22
Location: Rochester, NY, USA
Contact:

more stuff on getting lock/pk

Post by dieselmachine » 2003-06-15 19:04

ok, to start with, i am using a modded version of dc++k, but my question is regarding dc protocol, so i dont think it should matter :P

it's set up to download filelists automatically when users enter the hub. one of the additions i have made is a 'hook' in the onLock method which saves the lock and pk into the user object when they are sent. As i understand it, a $Lock is sent on any connection attempt. Thus, if i request a filelist, and a user is using NMDC, they will reply to my $ConnectToMe with a $Lock, then send a $MaxedOut. thus, i will still have their lock and pk.

My edited version, upon receiving the lock/pk combo, will update the hub screen and display the lock and pk on the screen. and 99% of the time, the lock and pk are retrieved even if no transfer starts. However, on rare occasions, I will receive a "No slots available" error, and find that the screen has not been updated with lock and pk info.

Is there anyway this could happen? Legitimately, I mean? Connection Timeout I can understand, as no connection was made. The fact that I received a MaxedOut means the connection was made, but a Lock wasnt sent. I'm trying to determine whether this is just a random thing, or a possible result of slot blocking...

Also, can anyone enlighten me as to what exactly the $Ping command does? And what kind of response is generated? I understand dc++ will ignore it, but what will NMDC reply with? Also, since it's UDP, how do i go about sending one out? Or is this a hub-client thing, which clients can't do?

Atomic Jo
Posts: 62
Joined: 2003-01-04 03:50
Location: Québec, Canada
Contact:

Post by Atomic Jo » 2003-06-15 20:12

Logically MaxedOut is send only when user has no free slot. But it must be send after the client handshake. You may allways receive a MyNick/Lock string, and only after that, you can receive a MaxedOut string.

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

Re: more stuff on getting lock/pk

Post by GargoyleMT » 2003-06-19 20:13

dieselmachine wrote:Also, can anyone enlighten me as to what exactly the $Ping command does? And what kind of response is generated? I understand dc++ will ignore it, but what will NMDC reply with? Also, since it's UDP, how do i go about sending one out? Or is this a hub-client thing, which clients can't do?
Look at the BCDC++ source if you're looking at hooking $Ping support in to DC++. I believe it responds to $Pings as part of its NMDC emulation.

Locked