<Introduction / Contents>
Command Types (server to server)
Direct Connect uses UDP for server to server communication.
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.
$Up
This message will be sent to each linked server.
$Up <linkedserverpassword> <ownip>
- <linkedserverpassword> is the multi-hub searching password shared by linked hubs.
- <ownip> is the ip address of the hub sending the command.
The server receiving the $Up command must then respond with
$UpToo <linkedserverpassword> <ownip>
- <linkedserverpassword> is the multi-hub searching password shared by linked hubs.
- <ownip> is the ip address of the hub sending the command.
$Search
Clients are either "active", indicating they are on the Internet
and can receive data directly from peers, or "passive", in which case
they can communicate only through the existing connection to the
server. To perform a search, an active client can send,
$Search <clientip>:<clientport> <searchstring>
i.e. $Search 64.78.55.32:412 T?T?500000?1?madonna$ray
- <clientip> is this client's IP address.
- <clientport> is a UDP port on which the client is listening for responses.
- <searchstring> is a string describing the file the client is searching for.
<searchstring> is made up of
<sizerestricted>?<isminimumsize>?<size>?<datatype>?<searchpattern>
- <sizerestricted> is T if the search should be restricted to files of a minimum or maximum size, otherwise F.
- <isminimumsize> is F if <sizerestricted> is F or if the size restriction places an upper limit on file size, otherwise T.
- <size> is the minimum or maximum size of the file to report (according to <isminimumsize>) if <sizerestricted> is T, otherwise 0.
- <datatype> restricts the search to files of a particular type. It is an integer selected from:
- 1 for any file type
- 2 for audio files ("mp3", "mp2", "wav", "au", "rm", "mid", "sm")
- 3 for compressed files ("zip", "arj", "rar", "lzh", "gz", "z", "arc", "pak")
- 4 for documents ("doc", "txt", "wri", "pdf", "ps", "tex")
- 5 for executables ("pm", "exe", "bat", "com")
- 6 for pictures ("gif", "jpg", "jpeg", "bmp", "pcx", "png", "wmf", "psd")
- 7 for video ("mpg", "mpeg", "avi", "asf", "mov")
- 8 for folders
-
<searchpattern> is used other users to determine if any files match. It is of the form:
<term1>$<term2>$<term3>$...$
where <term1>, <term2>, ... are search terms; normally, each search term is a space-delimited word entered by the user. Each search term is followed by a $, and after the last search term there is a total of two $.
$ConnectToMe
This message sends the server to each linked server, when a user sends the
$MultiConnectToMe message.
$ConnectToMe <remotenick> <senderip>:<senderport>
- <remotenick> is the nick who we would like to connect to.
- <senderip> is our external ip address.
- <senderport> is the port we are listening on.