<Introduction / Contents>

Client to Client HandShake

$MyNick

The listen User sends his Name when a user connecting.

$MyNick <ownnickname>

The $Lock is sent immediately after the $MyNick command within the same packet.

$Lock <lock> Pk=<pk>

Immediately following the $MyNick + $Lock packet the connecting user sends their $MyNick + $Lock in the same fashion as above.

$Direction

The $Direction command is a part of the response packet to the $Lock + $MyNick packet.

$Direction <direction> <anumber>

After the $Direction command we must send the $Key command (still with in the $Direction packet) in response to the other clients lock.

$Key <key>

The users are now connected.

$Send

The $Send command informs the uploading client, that the download will start.

$Send

Direct Connect sends upload data in chunks of 40906 bytes. After every 40906 bytes is recived the downloading client must send the $Send again.


Download Example:

	Client <-> Client Communication in DC. 11-05-2002. By aDe 
	---------------------------------------------------------- 

	ACTIVE FILE DOWNLOAD 
	---------------------- 
	D = downloader 
	U = uploader 
	H = hub 

	D>H: $ConnectToMe <U's username> <D's IP and port>|
	H>U: $ConnectToMe <U's username> <D's IP and port>|
	U>D: Connection
	U>D: $MyNick <U's nick>|$Lock <new lock with pk>|
	D>U: $MyNick <D's nick>|$Lock <new lock with pk>|$Direction Download <anumber>|$Key <key for U's lock>|
	U>D: $Key <key for D's lock>|
	D>U: $Get <filepath + filename in exact case>$<start at byte (1=beginning of file)>|
	U>D: $FileLength <length of the requested file>|
	D>U: $Send|
	U>D: Data, in many chunks.
	D>U: $Send|       <- when 40906 bytes are sent, ask for more