https://wiki.preterhuman.net/index.php?title=Hotline_Protocol_Documentation&feed=atom&action=historyHotline Protocol Documentation - Revision history2024-03-29T13:09:01ZRevision history for this page on the wikiMediaWiki 1.35.0https://wiki.preterhuman.net/index.php?title=Hotline_Protocol_Documentation&diff=10315&oldid=prevNetfreak at 06:05, 23 July 20192019-07-23T06:05:10Z<p></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 06:05, 23 July 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"><html></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"><!-- misc-responsive --></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"><ins class="adsbygoogle"</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> style="display:block"</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> data-ad-client="ca-pub-8542359430745061"</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> data-ad-slot="5971110325"</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> data-ad-format="auto"</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> data-full-width-responsive="true"></ins></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"><script></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">(adsbygoogle = window.adsbygoogle || []).push({});</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></script></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></html></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Original documents can be seen at https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline-Protocol-1.1.1.pdf and https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline_Protocol_Guide.txt and https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline%20Protocol%20Guide</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Original documents can be seen at https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline-Protocol-1.1.1.pdf and https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline_Protocol_Guide.txt and https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline%20Protocol%20Guide</div></td></tr>
</table>Netfreakhttps://wiki.preterhuman.net/index.php?title=Hotline_Protocol_Documentation&diff=4288&oldid=prevNetfreak at 23:36, 27 September 20182018-09-27T23:36:47Z<p></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:36, 27 September 2018</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><html></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><!-- misc-responsive --></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><ins class="adsbygoogle"</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> style="display:block"</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> data-ad-client="ca-pub-8542359430745061"</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> data-ad-slot="5971110325"</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> data-ad-format="auto"</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> data-full-width-responsive="true"></ins></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><script></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">(adsbygoogle = window.adsbygoogle || []).push({});</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></script></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></html></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Original documents can be seen at https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline-Protocol-1.1.1.pdf and https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline_Protocol_Guide.txt and https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline%20Protocol%20Guide</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Original documents can be seen at https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline-Protocol-1.1.1.pdf and https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline_Protocol_Guide.txt and https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline%20Protocol%20Guide</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>Netfreakhttps://wiki.preterhuman.net/index.php?title=Hotline_Protocol_Documentation&diff=1827&oldid=prevNetfreak at 22:01, 13 January 20172017-01-13T22:01:01Z<p></p>
<a href="https://wiki.preterhuman.net/index.php?title=Hotline_Protocol_Documentation&diff=1827&oldid=1826">Show changes</a>Netfreakhttps://wiki.preterhuman.net/index.php?title=Hotline_Protocol_Documentation&diff=1826&oldid=prevNetfreak at 21:59, 13 January 20172017-01-13T21:59:20Z<p></p>
<a href="https://wiki.preterhuman.net/index.php?title=Hotline_Protocol_Documentation&diff=1826&oldid=1825">Show changes</a>Netfreakhttps://wiki.preterhuman.net/index.php?title=Hotline_Protocol_Documentation&diff=1825&oldid=prevNetfreak: Created page with "Original document can be seen at https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline-Protocol-1.1.1.pdf <pre> Hotline Protocol v1.1.1 By Virtual1, PDF'd by Wade..."2017-01-13T21:54:31Z<p>Created page with "Original document can be seen at https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline-Protocol-1.1.1.pdf <pre> Hotline Protocol v1.1.1 By Virtual1, PDF'd by Wade..."</p>
<p><b>New page</b></p><div>Original document can be seen at https://cdn.preterhuman.net/texts/computing/hotline_info/Hotline-Protocol-1.1.1.pdf<br />
<br />
<pre><br />
Hotline Protocol<br />
v1.1.1<br />
By Virtual1, PDF'd by Wade Tregaskis (aka Sys)<br />
virtualftp.neotek.net<br />
http://2100sw.8m.com/<br />
18/2/2000<br />
<br />
Notes<br />
You can download the latest version of this document from the<br />
2100 Software web site (http://2100sw.8m.com/), as well as the<br />
Pacific Media & Design Hotline server, hotline://pmd.dhs.org/<br />
This guide was generated during several days of intense use of<br />
OTSessionWatcher, to get the protocol figured out in preparation for the<br />
development of HotSocket, a RealBasic socket-based class for use as a<br />
Hotline Client/Server interface.<br />
<br />
Thanks goes out to XAW and his development of the BHC, (Basic<br />
Hotline Client) whose RealBasic source code gave me (Virtual1) the<br />
insight necessary to begin to understand what I was seeing in the<br />
Session Watcher. Thanks also to the creators of mBot, without whose<br />
greed and lack of interest in releasing source code led me to make<br />
HotSocket, and thus, the need to make this guide. ;)<br />
<br />
Chapter 1: Numbers & Strings<br />
Anywhere there is a number that is preceeded by a length, (such as<br />
if the number is the only part of an object, like Socket or Icon) then the<br />
number can be a short OR a long. Hotline client and server software will<br />
always pick the smaller of the two when sending, though it does not<br />
hurt them to receive a long that is zero.<br />
Numbers appear to be stored as "two's complement".<br />
0 = 00 00 00 00 (you can send as a short 00 00)<br />
1 = 00 00 00 01 (you can send as a short 00 01)<br />
65535 = 00 00 FF FF (you can send as a short FF FF)<br />
65536 = 00 01 00 00<br />
2 = 7F FF FF FF<br />
-2147483648 = 80 00 00 00 (now counting backwards toward<br />
zero)<br />
-1 = FF FF FF FF<br />
<br />
This is how 2's complement works. The only place you'd have to<br />
worry about this is if you ran into a file > 2.1gb that was returning a<br />
negative filesize or something. Remember that icons can be negative<br />
numbers.<br />
<br />
It might be simpler to just send everything you can as a long.<br />
Some items must be sent as shorts if they don't have a length indicated<br />
in the protocol, such as all length indicators and some items in<br />
filelist/userlist entries. Anywhere you see short() or long(), it means<br />
that you MUST send it that way, because there is no length indicator.<br />
Anywhere you see number(), you need to send the length as a short,<br />
followed by the number, in your chosen format.<br />
<br />
There are a few oddball exceptions. Icon numbers are numbers,<br />
and normally the server will send them in Number format. (length<br />
followed by the number) Userlists however, send the Socket, Icon, and<br />
Status objects without length bytes, (all as shorts) Filelists have the<br />
same limitation. In the event of a negative icon number, (it can happen,<br />
and does work) the icon will be sent as a SHORT two's complement<br />
number. They are very easy to convert fortunately... just lop off the the<br />
first two characters of the number. -3 changes from FF FF FF FD to FF<br />
FD. This limits your numeric range to -32768 <-> +32767.<br />
Strings are always sent as a length (always a short) followed by<br />
the string's characters. Strings marked as "encoded" have each<br />
character of the string EOR'd with $FF. i.e. y=chr(255-asc(x)) It's not<br />
meant to be hard to crack, just hard to READ and easy to DO. Normal<br />
string format is commonly referred to as a "pascal string", if you happen<br />
to know it by that name.<br />
<br />
Chapter 2: Objects<br />
Objects are sent under the following format:<br />
• object header<br />
• short (object ID number)<br />
• short (object length)<br />
Note: This does not count these four header bytes<br />
• object data<br />
if it's a number >=0 and <65536:<br />
• short (number)<br />
if it's a number >65535:<br />
• long (number)<br />
if it's a number <0:<br />
• long (2^32+number)<br />
if it is a string:<br />
• string encoded strings have all chars EOF $FF)<br />
if it is a filelistentry<br />
• file type four characters, or "fldr" if folder, or<br />
"alis" if unresolved alias<br />
• file creator four characters, or long(0) if folder<br />
• long (contained files if folder, file size in bytes if doc/app)<br />
• long (0) unused, always zero<br />
• long (filename length)<br />
• string (filename)<br />
if it is a Path<br />
• short (directory levels)<br />
• one or more directory levels<br />
• 00 just one chr(0), not sure what it's for<br />
• short (length of dir name)<br />
• string (dir name)<br />
if it is a userlistentry<br />
• short (socket)<br />
• short (icon)<br />
• short (status)<br />
• short (length of nick)<br />
• string (nick)<br />
if it is a datetime<br />
• eight bytes of date/time code<br />
<br />
Integer objects are preceeded by a length for a reason. Do not<br />
assume that just because the object you are expecting can only be a<br />
number 0-50 ,that it will have to be sent as a short. It could be sent as<br />
a long, and we don't want to break the socket for such a simple<br />
misunderstanding. The reverse is true for longs, they may be sending an<br />
icon number that is 5, and decide to save a few bytes and send it as a<br />
short. Be careful.<br />
<br />
Client objects and their ID numbers:<br />
ID# Name Object Type<br />
100 errormsg string<br />
101 message string<br />
102 nick string<br />
103 socket number<br />
104 icon number<br />
105 login encoded string (NOT encoded in transaction #352)<br />
106 password encoded string<br />
107 xferID number - the ID number of the file transfer<br />
108 xfersize number - size of file xfer, in bytes<br />
109 parameter number - specifies icon for broadcast<br />
110 privs eight bytes - can make 64 flags, only use 27<br />
111 ???<br />
112 status number (0 = black & active)<br />
113 ban short (0 = kick, 1 = ban)<br />
114 chatwindow Four random bytes?<br />
115 subject string - the new subject of a chat window<br />
200 fileentry file list entry<br />
201 filename string<br />
202 path path<br />
203 "flt" ???<br />
204 ???<br />
205 infolongtype string<br />
206 infocreator string<br />
207 infosize number<br />
208 infocreated datetime<br />
209 infomodified datetime<br />
210 comment string<br />
211 newfilename string<br />
212 targetpath path<br />
213 infotype string - the 4-character MacOS file type<br />
300 userlistentry user list entry<br />
Chapter 3: Transactions<br />
Transaction are sent under the following format:<br />
• header<br />
• short (transaction class) 0 = info/request, 1 = reply<br />
• short (transaction ID number) server replies are always zero<br />
• long (task number)<br />
• long (error code) valid if this is a reply, 0 = ok, 1 = err<br />
• long (length of data block)<br />
• long (length of data block, again)<br />
• data<br />
• short (number of objects in transaction)<br />
• objects can be one, many, or none<br />
<br />
It would be wise to assume that objects can be passed in any and<br />
possibly random order. Ensure that your code allows for this, otherwise<br />
your client or server may not handle new or alien clients/servers.<br />
Transaction IDs, classes, types, names, and objects:<br />
ID# Cls Init Type Name Object(s)<br />
101 0 Client request GetNews None<br />
0 1 Server reply GetNews message<br />
102 0 Server info NewPost message<br />
103 0 Client request PostNews message<br />
104 0 Server info Broadcast message<br />
104 0 Server info Error parameter, message<br />
104 0 Server info PrivateMessage socket, nick, message<br />
105 0 Client info SendChat message, chatwindow,<br />
parameter<br />
106 0 Server info RelayChat message, chatwindow<br />
107 0 Client request Login login, password, nick, icon<br />
108 0 Client request SendPM socket, message<br />
109 0 Server info Agreement message<br />
110 0 Client request Kick socket, ban<br />
111 0 Server info Disconnected message<br />
112 0 Client request CreatePchatWith socket<br />
0 1 Server reply CreatePchatWith chatwindow, socket, icon,<br />
status, nick<br />
ID# Cls Init Type Name Object(s)<br />
113 0 Server info InvitedToPchat chatwindow, socket, nick<br />
113 0 Client info AddToPchat socket,chatwindow<br />
114 0 Client Info RejectPchat chatwindow<br />
115 0 Client request ¬<br />
RequestJoinPchat ¬<br />
chatwindow<br />
0 1 Server reply JoiningPchat userlistentry, ¬<br />
userlistentry, subject<br />
116 0 Client Info LeavingPchat chatwindow<br />
117 0 Server Info JoinedPchat chatwindow, socket, icon,<br />
status, nick<br />
118 0 Server Info LeftPchat chatwindow, socket<br />
119 0 Server Info ChangeSubject chatwindow, subject<br />
120 0 Client Info ChangeSubject chatwindow, subject<br />
200 0 Client request ¬<br />
FolderList (path)<br />
0 1 Server reply FolderList file entry<br />
202 0 Client request Download file name, path<br />
0 1 Server reply Download xfersize, xferID<br />
203 0 Client request Upload filename, path, xfersize<br />
0 1 Server reply Upload XferID<br />
204 0 Client request MoveToTrash ¬<br />
filename, path<br />
205 0 Client request CreateFolder ¬<br />
filename, path<br />
206 0 Client request GetFileInfo ¬<br />
filename, path<br />
0 1 Server reply GetFileInfo<br />
info type, info long type,<br />
info creator, file name,<br />
info created, info<br />
modified, info size,<br />
comment<br />
207 0 Client request SetFileInfo<br />
filename, path,<br />
new file name / comment<br />
208 0 Client request MoveFile file name, path, target<br />
path<br />
209 0 Client request MakeAlias file name, path, target<br />
path<br />
300 0 Client request GetUserList (none)<br />
ID# Cls Init Type Name Object(s)<br />
0 0 Server reply GetUserList user list entry<br />
301 0 Server info UserChange socket, icon, nick,<br />
status<br />
302 0 Server info UserLeave socket<br />
303 0 Client request GetUserInfo socket<br />
0 1 Server reply GetUserInfo message, nick<br />
304 0 Client info ChangeNickIconStatus<br />
icon, nick, status<br />
350 0 Client request CreateUser login, password,<br />
nick, privs<br />
351 0 Client request DeleteUser login<br />
352 0 Client request OpenUser login (NOT ENCODED)<br />
0 1 Server reply OpenUser login, password,<br />
privs, nick<br />
353 0 Client request ModifyUser nick, login,<br />
password, privs<br />
Transactions dealing with files always include the filename. If<br />
the path is not included, root folder can be assumed. If the file is being<br />
moved or aliased, targetpath may also be included. If not, root is<br />
assumed as the target.<br />
<br />
Notes:<br />
• Transaction #105 (SendChat) is chat. When sent with a<br />
parameter of 1, it becomes an emote.<br />
• Server reply to #352 always returns string(ctrl-G) as password.<br />
• #353 must send a password string (chr(0)) if password was not<br />
changed. Returning string (ctrl-G) will result in that being the user's<br />
new password!<br />
• Unless otherwise specified, a successful task reply will have an<br />
error code of 0 and no objects. Unsuccessful tasks will reply with an<br />
error code of 1 and the error message object.<br />
• Server transaction #104 "Error" is used for when client sends a<br />
non-request that fails, such as trying to send public chat when they<br />
don't have chat privs.<br />
• Reply to #303 (get info) will be missing the Nick object if you're<br />
getting info on a "ghost". (the HL client returns "Unnamed User")<br />
• Task is a reply to a request. The object(s) included in the Task<br />
are dependent on what the request was. The Task can be matched back <br />
to its request by using the task number portion of the header. It's<br />
probably possible to reuse task numbers, but don't re-issue a task<br />
number in a request until the current instance of that task number has<br />
been replied to! I have noticed that while the client can create tasks,<br />
the server cannot. This makes sense, because a server would eventually<br />
crash or eat up all available memory if it had to remember tasks until<br />
complete, assuming it was up a week or so and had clients leaving tasks<br />
hanging.<br />
<br />
Chapter 4: Logging In<br />
Before sending a login, you must establish a "pipe". Do this by<br />
connecting over TCP to the server (the default port is 5500), and then<br />
exchanging this "handshake" with the server:<br />
CLIENT HELLO<br />
• "TRTPHOTL" identifies this is a hotline client<br />
• short (1) Minimum server version this client is compatible with?<br />
• short (2) Client version?<br />
TRTPHOTL (0) (1) (0) (2)<br />
SERVER HELLO<br />
• "TRTP"<br />
• long (errorcode) - 0 = OK you are connected, 1 = rejected<br />
TRTP (0) (0) (0) (0)<br />
Once these have been exchanged, you can assume you are connected<br />
to a HL server and can proceed to login. Until you have received a<br />
success reply to your login transaction, the only other transaction you<br />
can submit is a request for disconnect.<br />
Once logged in, you are by no means required to request a userlist,<br />
request news, or do anything else for that matter. The normal client<br />
will send the login and then immediately fire off a request for the<br />
agreement, userlist and news, before even receiving confirmation of a<br />
successful login.<br />
<br />
Chapter 5: Further Notes<br />
I have seen many admins and co-admins running around kicking idle<br />
users, saying they are "taking up bandwidth". I was wondering if this<br />
was true, and did some pondering. A user that is completely idle (no file<br />
xfers) by themselves will take zero bandwidth. There will be some<br />
bandwidth needed though for each time a user in the user list goes idle,<br />
goes active, changes nick or icon, leaves, arrives, or someone posts<br />
public chat. Each of these events requires a task to be sent to every<br />
user online, though the amount of data sent is quite small. News posts<br />
also go to all users, and those can be relatively large in comparison to<br />
the other transactions. It sounds kind of silly, but it is in everyone's<br />
best interest that on busy file serving server, you should be quiet and<br />
use chat only sparingly.<br />
</pre><br />
<br />
[[Category:Hotline]]</div>Netfreak