Editing
Protocol
(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!
==Client Interface with Tracker== After establishing a connection with tracker, the following information is sent: {| border="1" cellpadding="0" cellspacing="0" | style="width: 103px;" | Description | style="width: 42px;" | Size | style="width: 66px;" | Data | style="width: 379px;" | Note |- | style="width: 103px;" | Magic number | style="width: 42px;" | 4 | style="width: 66px;" | ‘HTRK’ | style="width: 379px;" | |- | style="width: 103px;" | Version | style="width: 42px;" | 2 | style="width: 66px;" | 1 or 2 | style="width: 379px;" | Old protocol (1) or new (2) |} When version number is 2, request also includes additional data: {| border="1" cellpadding="0" cellspacing="0" | style="width: 103px;" | Description | style="width: 42px;" | Size | style="width: 66px;" | Data | style="width: 379px;" | Note |- | style="width: 103px;" | Login size | style="width: 42px;" | 1 | style="width: 66px;" | >= 31 | style="width: 379px;" | Login string size |- | style="width: 103px;" | Login | style="width: 42px;" | size | style="width: 66px;" | | style="width: 379px;" | Login string (padded with 0) |- | style="width: 103px;" | Password size | style="width: 42px;" | 1 | style="width: 66px;" | >= 31 | style="width: 379px;" | Password string size |- | style="width: 103px;" | Password | style="width: 42px;" | size | style="width: 66px;" | | style="width: 379px;" | Password string (padded with 0) |} Reply received from the tracker starts with a header: {| border="1" cellpadding="0" cellspacing="0" | style="width: 103px;" | Description | style="width: 42px;" | Size | style="width: 66px;" | Data | style="width: 379px;" | Note |- | style="width: 103px;" | Magic number | style="width: 42px;" | 4 | style="width: 66px;" | ‘HTRK’ | style="width: 379px;" | 0x4854524B |- | style="width: 103px;" | Version | style="width: 42px;" | 2 | style="width: 66px;" | 1 or 2 | style="width: 379px;" | Old protocol (1) or new (2) |} Server information header follows, formatted as: {| border="1" cellpadding="0" cellspacing="0" | style="width: 115px;" | Description | style="width: 41px;" | Size | style="width: 64px;" | Data | style="width: 370px;" | Note |- | style="width: 115px;" | Message type | style="width: 41px;" | 2 | style="width: 64px;" | 1 | style="width: 370px;" | Sending list of servers |- | style="width: 115px;" | Message data size | style="width: 41px;" | 2 | style="width: 64px;" | | style="width: 370px;" | Remaining size of this request |- | style="width: 115px;" | Number of servers | style="width: 41px;" | 2 | style="width: 64px;" | | style="width: 370px;" | Number of servers in the server list |- | style="width: 115px;" | Number of servers | style="width: 41px;" | 2 | style="width: 64px;" | | style="width: 370px;" | Same as previous field |- | style="width: 115px;" | Server list… | style="width: 41px;" | | style="width: 64px;" | | style="width: 370px;" | |} A record in the server list has the following structure: {| border="1" cellpadding="0" cellspacing="0" | style="width: 103px;" | Description | style="width: 42px;" | Size | style="width: 66px;" | Data | style="width: 379px;" | Note |- | style="width: 103px;" | IP address | style="width: 42px;" | 4 | style="width: 66px;" | | style="width: 379px;" | Server’s IP address |- | style="width: 103px;" | IP port number | style="width: 42px;" | 2 | style="width: 66px;" | | style="width: 379px;" | Server’s IP port number |- | style="width: 103px;" | Number of users | style="width: 42px;" | 2 | style="width: 66px;" | | style="width: 379px;" | Number of users connected to this particular server |- | style="width: 103px;" | | style="width: 42px;" | 2 | style="width: 66px;" | 0 | style="width: 379px;" | |- | style="width: 103px;" | Name size | style="width: 42px;" | 1 | style="width: 66px;" | | style="width: 379px;" | Server’s name string size |- | style="width: 103px;" | Name | style="width: 42px;" | size | style="width: 66px;" | | style="width: 379px;" | Server’s name |- | style="width: 103px;" | Description size | style="width: 42px;" | 1 | style="width: 66px;" | | style="width: 379px;" | Server’s description string size |- | style="width: 103px;" | Description | style="width: 42px;" | size | style="width: 66px;" | | style="width: 379px;" | Description of the server |} If the number of servers in the server list is less than number of servers specified in the server information header, client will expect an additional server information, starting with the new server information header. The field containing number of servers in the new header should have the same value as the previous one. When a client is connected to the tracker over the HTTP tunneling protocol, the client does not send any request to the tracker, although it still expects a properly formatted reply. In this case establishing a connection to the tracker indicates a request for the server list.
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