PLEASE USE Wiki INSTEAD
Edit by Mutor

Introduction

I have compiled this protocol documentation from various sources in hopes of creating a complete Direct Connect protocol reference.

The following users have contributed to this file.

Sid, aDe, Sedulus, David Marwood, Suxxx, Stefan Gorling, Sphinx & HaArD

The Direct Connect network is composed of Hubs, Clients, and the HubListServer. Hubs listen on TCP port 411 and allow many clients to connect and exchange commands such as searches and chat messages. Essentially, hubs are a naming service and communication facilitator for clients. Clients store files and respond to searches against those files. The HubListServer acts as a naming service for all the hubs. All hubs register with the HubListServer and clients discover hubs by asking the HubListServer. Clients are run by users, each of whom has a nick (aka username).

The TCP data is a series of commands, each in the form of,

The | indicates the end of a command and is not followed by a newline.

Certain users are designated as Ops by the hub and are able to issue certain commands not available to other users.

Table Of Contents

Introduction -- Introduction

Client2Client_Handshake -- Client to Client HandShakeClient2Server_Login -- Client to Server LoginServer2RegServer_HubRegistration -- Server to Hub Registration Server Communication
Command_Types_(client_to_client) -- Command Types (client to client)
Command_Types_(client_to_server) -- Command Types (client to server)Command_Types_(server_to_server) -- Command Types (server to server)
Command_Types_(experimental) -- Command Types (experimental)
Appendix_A -- Converting a Lock into a Key
Appendix_B -- Creating a Lock

<Introduction / Contents>

Client to Client HandShake

$MyNick

The listen User sends his Name when a user connecting.

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

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.

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


<Introduction / Contents>

Command Types (client to server)

Direct Connect| (pipe). All Commands are case sensitive.

$Hello

Shortly after a new user, <nick> logs in, the server must send,

This indicates <nick> has logged in. If the new user is an operator, the server must additionally send a $OpList command to all users (documented at $GetNickList).

Each client should add <nick> to its list of hub users and, if $OpList is also received, update its list of operators. The new client must reply:

$GetNickList

To obtain a list of other users' nicks, the client may send,

to which the server must reply,

If a client receives a $OpList command listing its own nick, it should enable the "Redirect User" and "Kick" functions.

$MyINFO (Client to Server)

Shortly after logging in, the client must send,