<Introduction / Contents>

Command Types (client to client)

Direct Connect uses TCP and UDP for client to client communication.
Normaly the client listen at port 412 for client connections, but if the port already in use it uses 413,414 and so on..
The following section describes the format of the Commands, Each field is denoted with < >.
The fields in the command are separated by a single space character (ASCII 32).
And each Command ends with a | (pipe). All Commands are case sensitive.

$GetListLen

The downloading client sends the $GetListLen to request the filesize of the remote DCList in bytes.

$GetListLen

The uploading client responds to the $GetListLen command with $ListLen.

$ListLen <sizeinbyte>

$MaxedOut

The $MaxedOut command is sent when there are no freeslots available from the uploading user.

$MaxedOut

$Error

The $Error command is sent when an error occurs, like file not found.

$Error <errormessage>

$Get

The $Get command is used to request a file from the uploading client.

$Get <filenameandpath>$<resumecount>

$FileLength

The $FileLength is sent in response to the $Get command.

$FileLength <sizeinbytes>

$Canceled

The $Canceled command is sent by eather party signifying that the download has been canceled prematurly.

$Canceled

UDP Client To Client Commands

The following commands are the Client To Client UDP Commands.

$SR

The $SR command is sent in response to a client searching. This is sent UDP when the searching client is in Active Mode.

$SR <nick> <searchresponse> <hubip>:<hubport>

<searchresponse> is made up of

<filenamewithpath><filesizeinbytes> <current openslots>/<allopenslots><hubname>

$Ping

I'm not sure what the purpose of this command.

$Ping <senderIp>:<senderPort>