Editing
Virtual1's Hotline Server Protocol Guide
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Chapter 2: OBJECTS=== objects are sent under the following format: β’ object header β’ short (object ID number) β’ short (object length) does not count these four header bytes β’ object data if it's a number >=0 and <65536: β’ short (number) if it's a number >65535: β’ long (number) if it's a number <0: β’ long (232+number) if it is a string: β’ string encoded strings have all chars EOF $FF) if it is a filelistentry β’ file type four characters, or "fldr" if folder, or "alis" if unresolved alias β’ file creator four characters, or long(0) if folder β’ long (file size in bytes, zero if folder) β’ long (contained items, zero if app/doc) β’ long (filename length) β’ string (filename) if it is a Path β’ short (directory levels) β’ one or more directory levels β’ short (0) not sure what it's for β’ byte (length of dir name) β’ string (dir name) if it is a userlistentry β’ short (socket) β’ short (icon) β’ short (status) β’ short (length of nick) β’ string (nick) if it is a datetime β’ short (base year - usually 1904) β’ short (0) β’ long (number of seconds this date is from midnight, jan 1, base year) if it is a resumeinfo β’ "RFLT" - Resume FiLe Transfer β’ short (1) β’ 34 zeros = 8 x long(0) + 1 x short(0) β’ short (2) β’ Data descriptor β’ "DATA" β’ long (index to start at) β’ long (0) β’ long (0) β’ Resource descriptor β’ "MACR" β’ long (index to start at) β’ long (0) β’ long (0) if it is a newsgroup β’ const ($33 31 31 33 - no idea why, but it's always there) β’ long (post count) β’ pstring (category name) β’ const ($00) β’ posts β’ long (thread ID) β’ long (date) β’ long (parent thread ID) β’ const ($00 00 00 00) β’ short (message element count) β’ pstring (subject) β’ pstring (poster) β’ message elements β’ pstring (mime type) β’ short (post size?) if it's a newsfolderitem β’ byte (item type: $01=folder, $0A=category) β’ raw data (folder/category name, no length byte) Integer objects are preceeded by a length for a reason. Do not assume that just because the object you are expecting can only be a number 0-50 ,that it will have to be sent as a short. It could be sent as a long, and we don't want to break the socket for such a simple misunderstanding. The reverse is true for longs, they may be sending an icon number that is 5, and decide to save a few bytes and send it as a short. BEWARE. client objects and their ID numbers: ID# Name Object Type 100 errormsg string 101 message string 102 nick string 103 socket number 104 icon number 105 login encoded string NOT encoded in transaction #352 106 password encoded string 107 xferID number the ID number of the file transfer (usually 32 bit) 108 xfersize number size of file xfer, in bytes (smaller for resumes!!) 109 parameter number specifies icon for broadcast, also emote flag 110 privs eight bytes can make 64 flags, only use 27 111 ??? 112 status number 0=black non-idle 113 ban short (1) include to make a kick into a ban 114 chatwindow four random bytes?? example: 84 47 5E 02 115 subject string the new subject of a chat window 116 waiting count object 200 fileentry filelistentry 201 filename string 202 path path 203 resumeinfo resume 204 resumeflag short (1) 205 infolongtype string "Text File" 206 infocreator string "Simpletext" 207 infosize number 208 infocreated datetime 209 infomodified datetime 210 comment string 211 newfilename string 212 targetpath path 213 infotype string the 4-char macos type code (redundant, client already has C/T) 214 Quote string 300 userlistentry userlistentry 320 newsfolderitem newsfolderitem 321 catlist newsgroup 322 category string 325 newspath path this one revealed to me its "true nature" in v1.5 ! 326 threadID number the serial number of a message, for threading 327 newstype string 328 newssubject string 329 author string 330 newsdate date 331 prevthread number 332 nextthread number 333 newsdata string 334 unknown! number? Note! XferSize is the actual number of bytes in the file if it's a download, but it's the size of the file datablock (length of file - 146 - length of filename - length of comment) if it's an upload! :P (that's length PLUS 146 PLUS filename)
Summary:
Please note that all contributions to Hotline Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
HL Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Navigation
Home
Clients
Servers
Trackers
Development
Recent Changes
discord
Our Discord(BNETcc)
Macintosh Garden
partners
Macintosh Garden
BNET.cc
Moghouse
Tools
What links here
Related changes
Special pages
Page information