PtokaX wiki

Hub (server) for Direct Connect

User Tools

Site Tools


dcprotocol

Direct Connect protocol documentation

Basic info

Direct Connect protocol is text based peer-to-peer file sharing protocol for client-server network. Was created by Jon Hess under company NeoModus. Original protocol don't have official documentation and documentation was created by reverse engineering of original software (see links to original software on bottom). For protocol extensions is in most cases documentation available.

Protocol basics

  • Protocol commands start with $.
  • In client from/to hub connection command starting with < is used as chat message.
  • Commands starting with another character are usually used as chat when hub send them to client or ignored in client to client connection.
  • Protocol commands end with | (pipe).
  • Most commands use $ and space as separators.
  • Original software use default ASCII character encoding of Operating system where is running. It is possible to use UTF-8 because it is backward compatible with ASCII. Of course software without UTF-8 support don't show all characters correctly. But it is same as with ASCII when software is running on Operating systems with different encoding (most visible when one side is using western encoding and other russian encoding).
  • For hub addresses is used (but optional) <html><b>dchub:</b></html> prefix.
    * Default hub port is 411, when hub address don't contain port then client automatically connecting to port 411.
    * Client is identified by Nick.
    * Clients can use one of two modes: Active or Passive. Client in Active mode can download from all clients and use UDP to receive search reply. Client in Passive mode can download only from Active clients and receive search reply over TCP connection with hub. * Connection from client to hub use TCP. Connection for transfers between clients use TCP. Search reply is using UDP when user is active.
    * Protocol use Escape sequences for special characters. Escape sequence is /%DCNxxx%/ where xxx is decimal number for ASCII character code. * Original software use these escape sequences: - /%DCN000%/ (null character is not allowed by protocol). - /%DCN005%/ (enquiry, used by some protocol commands). - /%DCN036%/ ($, used by some commands). - /%DCN096%/ (`). - /%DCN124%/ (|, used as end of command). - /%DCN126%/ (~). * When DC++ use correctly original escape sequences for correct $Key command generation, for other part of protocol use html escapes: - &#36; ($, used by some commands). - &#124; (|, used as end of command). - &amp; (&). ===== Protocol commands ===== Client to Hub and Hub to Client commands.
    Client to Client commands. ===== Protocol extensions ===== IPv6 extensions. ===== Links to original software ===== Direct Connect client 1
    Direct Connect client 1 upgrade to latest 1 version
    Direct Connect client 2 Direct Connect hub 1
    Direct Connect hub 2
dcprotocol.txt · Last modified: 21/01/2013 18:23 by ppk