Main Page


My Games

My Projects

My Music

My Art

My Literature
- Technical Articles
- Poems
- Definitions
- Quotes
- Language Problems
- Stories
- Documentation
- | - Furcadia Server Protocol
- | - | - Game Server
- | - | - File Server

Links

I don't know a whole lot about this protocol, but I have the very basics figured out. This document is still in the early stages, so it's quite possible that some things are not completely accurate still. Currently only the download process is covered.

Supposedly all file downloads work like this also, not just dreams.

Last updated: 2005 June 17




All messages sent "to" the server seem to end in a cairrage return like the normal furc server. Similarly all non-binary messages from the server end in a cr.


Downloading A Dream

When you first connect to the file server, it will send this:
    10 Welcome to Furcadia file server, proceed to id.

The command to download a dream is the following:
    RC NAME PASSWORD DREAM_ID 0 2 CHUNKSIZE
Where:
    NAME and PASSWORD are your normal furcadia login.
    DREAM_ID is the ID from message 61:81 in the normal game server protocol, which begins with td.
    CHUNKSIZE is the size of chunks the server will send. Normally this is 4096 bytes, which means that the tcp/ip protocol will break it up into 2 packets of size 1460 and 1 packet of size 1176.
    I'm not sure what the 0 and 2 there are for yet.
So for example:
    RC MyName MyPass td2316690942 0 2 4096

The server should then respond with this:
    44 FILESIZE 2 CHUNKSIZE 0
Where:
    FILESIZE is size of the file.
    CHUNKSIZE is the same as above, possibly altered by the server if it didn't like your original number.
    Again, not sure what 0 and 2 are for.

It will then begin dumping binary data on you.

The whole file is sent in chunks. Each chunk is CHUNKSIZE bytes, and begins with a 10 byte chunk header. You are required to send a confirmation that you recieved each chunk before it will send you the next one. The last chunk is padded with 0's so that it is a full CHUNKSIZE bytes in length.

Each chunk header is 10 bytes total:
SCXXXXYYYY
The first 2 bytes are just the characters SC (0x53 0x43) followed by 4 bytes for the "chunk number". The "chunk number" starts at 0 for the first chunk, and is incremented for every chunk after that. The last 4 bytes there (YYYY) I'm not sure what it is. Following the 10 byte header is (CHUNKSIZE - 10) bytes of data for the actual file.

You simply append the data portions of these chunks together one after another, to get the resultant file. Do not append the padding of 0's in the last chunk though. You can determine how many bytes of real data the last chunk holds based off the FILESIZE that was given to you previously.

There should be exactly ceiling(FILESIZE/(CHUNKSIZE-10)) chunks total.

The acknowledgement to send (in plain, cr terminted text) after a chunk has been fully recieved is:
    PKOK CHUNK_NUMBER
Where CHUNK_NUMBMER is the number of the chunk, from the chunk's header.

After the last chunk is recieved and acknowledged, send the server:
    BYE
and it will respond with:
    99 Log out sequence initiated.

And now you have the "Dream File".




"Dream File" format

First is a header of some sort...
...looks like it's some sort of compressed format that can contain multiple files...



(c)2012 Luke Lenhart   -  97470 total visitors