I haven't posted here in a long time. However, recently I was browsing Github and Rune-Server looking into the current frameworks and servers being developed. I noticed most of these servers don't make use of the JAGGRAB protocol. I also noticed that there are very few sources of documentation for the JAGGRAB protocol online. Simply googling the term JAGGRAB will only provide one or two viable results. I believe more people would make use of this service if they could see it in a simplified format.
Ive written a small implementation to help put this into perspective. This is written as an example and does not reflect my programming style. [Only registered and activated users can see links. ]
I've also included a sample network infrastructure for all the necessary encoders & decoders to help demonstrate how all the client's protocol fits together. [Only registered and activated users can see links. ]
What is JAGGRAB?
JAGGRAB is the text based protocol that RuneScape clients use to request files from the server. This eliminates the need to have a user download a cache manually from an online source via the client. Every request is sent to the server in the form of a string and prefixed with the text JAGGRAB.
Once the server receives this request it then writes the appropriate data back to the client. The requests are broken up as follows.
"/crc" requests the cyclical redundancy checks for the files.
"/title" requests the tile screen components.
"/config" requests the configuration files.
"/interface" requests the interface file.
"/media" requests the media files.
"/textures" request the textures.
"/wordenc" requests the chat filter.
"/sounds" requests the audio files.
Every-time the client makes a request, it does so on a new socket connection. This means you will either need to manually close the connected socket after a file request is served or implement a time-out procedure. These connections will generally be serviced on the port 43595. Unlike the Ondemand protocol which functions on the same server as the actual game service, the JAGGRAB protocol runs on it's own server.
The CRC checks are generated on the server's end and written as the first request in the protocol. These are written first as their purpose is to help detect any illegal modifications or inconsistencies in data. These checks are relatively simple to generate and each attached to a file. Each individual checksum is written back as an integer. A final singular hash code of the checksums is then written as well.
File Data Structure
The protocol for reading from specific files.