Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ The header is four fixed entries and a variable length path:
* Path: UTF-8 encoded string that is *not* null terminated. (We send the length instead.)

The server will respond with:

* Command: Single byte. Always ``0x11``.
* Status: Single byte.
* 2 Bytes reserved for padding.
Expand All @@ -128,6 +129,7 @@ The server will respond with:
* Chunk-length contents of the file starting from the current position.

If the chunk length is smaller than the total length, then the client will request more data by sending:

* Command: Single byte. Always ``0x12``.
* Status: Single byte. Always OK for now.
* 2 Bytes reserved for padding.
Expand All @@ -153,13 +155,15 @@ The header is four fixed entries and a variable length path:
* Path: UTF-8 encoded string that is *not* null terminated. (We send the length instead.)

The server will repeatedly respond until the total length has been transferred with:

* Command: Single byte. Always ``0x21``.
* Status: Single byte. ``0x01`` if OK. ``0x02`` if any parent directory is missing or a file.
* 2 Bytes reserved for padding.
* Offset: 32-bit number encoding the starting offset to write. (Should match the offset from the previous 0x20 or 0x22 message)
* Free space: 32-bit number encoding the amount of data the client can send.

The client will repeatedly respond until the total length has been transferred with:

* Command: Single byte. Always ``0x22``.
* Status: Single byte. Always ``0x01`` for OK.
* 2 Bytes reserved for padding.
Expand All @@ -183,6 +187,7 @@ The header is two fixed entries and a variable length path:
* Path: UTF-8 encoded string that is *not* null terminated. (We send the length instead.)

The server will reply with:

* Command: Single byte. Always ``0x31``.
* Status: Single byte. ``0x01`` if the file or directory was deleted or ``0x02`` if the path is a non-empty directory or non-existent.

Expand All @@ -199,6 +204,7 @@ The header is two fixed entries and a variable length path:
* Path: UTF-8 encoded string that is *not* null terminated. (We send the length instead.)

The server will reply with:

* Command: Single byte. Always ``0x41``.
* Status: Single byte. ``0x01`` if the directory(s) were created or ``0x02`` if any parent of the path is an existing file.

Expand All @@ -215,6 +221,7 @@ The header is two fixed entries and a variable length path:
* Path: UTF-8 encoded string that is *not* null terminated. (We send the length instead.)

The server will reply with n+1 entries for a directory with n files:

* Command: Single byte. Always ``0x51``.
* Status: Single byte. ``0x01`` if the directory exists or ``0x02`` if it doesn't.
* Path length: 16-bit number encoding the encoded length of the path string.
Expand Down