mirror of
https://github.com/transmission/transmission
synced 2024-12-23 08:13:27 +00:00
Add a new bad-format message to avoid overloading not-supported.
This commit is contained in:
parent
fc912cbf98
commit
7fa08b8f3c
1 changed files with 43 additions and 33 deletions
|
@ -85,8 +85,8 @@ server receives a tagged message it must send exactly one message back
|
|||
with the same tag. The client is allowed to use the same tag for
|
||||
multiple messages, even if a response to the first is not received
|
||||
before the second it sent. If a tagged message does not normally
|
||||
require a response then a "succeeded", "failed" or "not-supported"
|
||||
message will be sent back.
|
||||
require a response then a "succeeded", "failed", "not-supported" or
|
||||
"bad-format" message will be sent back.
|
||||
|
||||
An example tagged message and response:
|
||||
|
||||
|
@ -120,7 +120,7 @@ the minimum protocol version that the key may be used with.
|
|||
Key: "addfiles"
|
||||
Version: 1
|
||||
Format: list of strings
|
||||
Replies: "succeeded", "failed", "not-supported", "info"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format", "info"
|
||||
Example: 8:addfilesl21:/torrents/foo.torrent20:/home/me/bar.torrente
|
||||
"addfiles", ("/torrents/foo.torrent", /home/me/bar.torrent")
|
||||
Details: Each string is the absolute path to a torrent metainfo file
|
||||
|
@ -132,7 +132,7 @@ Details: Each string is the absolute path to a torrent metainfo file
|
|||
Key: "addfile-detailed"
|
||||
Version: 2
|
||||
Format: dict
|
||||
Replies: "succeeded", "failed", "not-supported", "info"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format", "info"
|
||||
Example: 16:addfile-detailedd4:file19:/tor/wooble.torrente
|
||||
"addfile-detailed", {"file": "/tor/wooble.torrent"}
|
||||
Details: Dictionary containing information about a torrent for the
|
||||
|
@ -146,7 +146,7 @@ Details: Dictionary containing information about a torrent for the
|
|||
Key: "automap"
|
||||
Version: 2
|
||||
Format: boolean
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 7:automapi1e
|
||||
"automap", 1
|
||||
Details: Enable (1) or disable (0) automatic port mapping on the server.
|
||||
|
@ -154,16 +154,26 @@ Details: Enable (1) or disable (0) automatic port mapping on the server.
|
|||
Key: "autostart"
|
||||
Version: 2
|
||||
Format: boolean
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 9:autostarti0e
|
||||
"autostart", 0
|
||||
Details: Enable (1) or disable (0) automatic starting of new torrents
|
||||
added via "addfiles" or "addfiles-detailed" messages.
|
||||
|
||||
Key: "bad-format"
|
||||
Version: 2
|
||||
Format: value is ignored
|
||||
Replies: N/A
|
||||
Example: 10:bad-format0:
|
||||
"bad-format", ""
|
||||
Details: Sent in response to a tagged message which was structured
|
||||
incorrectly. For example, an "autostart" message with a
|
||||
string value might cause this message to be returned.
|
||||
|
||||
Key: "directory"
|
||||
Version: 2
|
||||
Format: string
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 9:directory21:/home/roger/downloads
|
||||
"directory", "/home/roger/downloads"
|
||||
Details: Set the default directory used for any torrents added in the future.
|
||||
|
@ -171,7 +181,7 @@ Details: Set the default directory used for any torrents added in the future.
|
|||
Key: "downlimit"
|
||||
Version: 2
|
||||
Format: int
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 9:downlimiti100e
|
||||
"downlimit", 100
|
||||
Details: Set the server's download limit in kilobytes per second.
|
||||
|
@ -182,13 +192,13 @@ Version: 2
|
|||
Format: string
|
||||
Replies: N/A
|
||||
Example: 6:failed17:permission denied
|
||||
"failed", "permission denied
|
||||
"failed", "permission denied"
|
||||
Details: Sent in response to a tagged message to indicate failure.
|
||||
|
||||
Key: "get-automap"
|
||||
Version: 2
|
||||
Format: value is ignored
|
||||
Replies: "failed", "not-supported", "automap"
|
||||
Replies: "failed", "not-supported", "bad-format", "automap"
|
||||
Example: 11:get-automap0:
|
||||
"get-automap", ""
|
||||
Details: Requests that an "automap" message be sent back.
|
||||
|
@ -196,7 +206,7 @@ Details: Requests that an "automap" message be sent back.
|
|||
Key: "get-autostart"
|
||||
Version: 2
|
||||
Format: value is ignored
|
||||
Replies: "failed", "not-supported", "autostart"
|
||||
Replies: "failed", "not-supported", "bad-format", "autostart"
|
||||
Example: 13:get-autostart0:
|
||||
"get-autostart", ""
|
||||
Details: Requests that an "autostart" message be sent back.
|
||||
|
@ -204,7 +214,7 @@ Details: Requests that an "autostart" message be sent back.
|
|||
Key: "get-directory"
|
||||
Version: 2
|
||||
Format: value is ignored
|
||||
Replies: "failed", "not-supported", "directory"
|
||||
Replies: "failed", "not-supported", "bad-format", "directory"
|
||||
Example: 13:get-directory0:
|
||||
"get-directory", ""
|
||||
Details: Requests that an "directory" message be sent back.
|
||||
|
@ -212,7 +222,7 @@ Details: Requests that an "directory" message be sent back.
|
|||
Key: "get-downlimit"
|
||||
Version: 2
|
||||
Format: value is ignored
|
||||
Replies: "failed", "not-supported", "downlimit"
|
||||
Replies: "failed", "not-supported", "bad-format", "downlimit"
|
||||
Example: 13:get-downlimit0:
|
||||
"get-downlimit", ""
|
||||
Details: Requests that a "downlimit" message be sent back.
|
||||
|
@ -220,7 +230,7 @@ Details: Requests that a "downlimit" message be sent back.
|
|||
Key: "get-info"
|
||||
Version: 2
|
||||
Format: dict with keys "id" and "type" for lists of ints and strings
|
||||
Replies: "failed", "not-supported", "info"
|
||||
Replies: "failed", "not-supported", "bad-format", "info"
|
||||
Example: 8:get-infod2:idli4ei7ei2ee4:typel4:hash4:nameee
|
||||
"get-info", {"id": (4, 7, 2), "type": ("hash", "name")}
|
||||
Details: Requests that the server send back an "info" message with
|
||||
|
@ -234,7 +244,7 @@ Details: Requests that the server send back an "info" message with
|
|||
Key: "get-info-all"
|
||||
Version: 2
|
||||
Format: list of strings
|
||||
Replies: "failed", "not-supported", "info"
|
||||
Replies: "failed", "not-supported", "bad-format", "info"
|
||||
Example: 12:get-info-alll4:hash4:namee
|
||||
"get-info-all", ("hash", "name")
|
||||
Details: Same as "getinfo" message with all torrent IDs specified.
|
||||
|
@ -242,7 +252,7 @@ Details: Same as "getinfo" message with all torrent IDs specified.
|
|||
Key: "get-pex"
|
||||
Version: 2
|
||||
Format: value is ignored
|
||||
Replies: "failed", "not-supported", "pex"
|
||||
Replies: "failed", "not-supported", "bad-format", "pex"
|
||||
Example: 7:get-pex0:
|
||||
"get-pex", ""
|
||||
Details: Requests that a "pex" message be sent back.
|
||||
|
@ -250,7 +260,7 @@ Details: Requests that a "pex" message be sent back.
|
|||
Key: "get-port"
|
||||
Version: 2
|
||||
Format: value is ignored
|
||||
Replies: "failed", "not-supported", "port"
|
||||
Replies: "failed", "not-supported", "bad-format", "port"
|
||||
Example: 8:get-port0:
|
||||
"get-port", ""
|
||||
Details: Requests that a "port" message be sent back.
|
||||
|
@ -258,7 +268,7 @@ Details: Requests that a "port" message be sent back.
|
|||
Key: "get-status"
|
||||
Version: 2
|
||||
Format: dict with keys "id" and "type" for lists of ints and strings
|
||||
Replies: "failed", "not-supported", "status"
|
||||
Replies: "failed", "not-supported", "bad-format", "status"
|
||||
Example: 10:get-statusd2:idli4ei7ei2ee4:typel5:state9:completedee
|
||||
"get-status", {"id": (4, 7, 4), "type": ("state", "completed")}
|
||||
Details: Same as "get-info" message except status type strings are used
|
||||
|
@ -267,7 +277,7 @@ Details: Same as "get-info" message except status type strings are used
|
|||
Key: "get-status-all"
|
||||
Version: 2
|
||||
Format: list of strings
|
||||
Replies: "failed", "not-supported", "status"
|
||||
Replies: "failed", "not-supported", "bad-format", "status"
|
||||
Example: 14:get-status-alll5:state9:completede
|
||||
"get-status-all", ("state", "completed")
|
||||
Details: Same as "get-status" message with all torrent IDs specified.
|
||||
|
@ -275,7 +285,7 @@ Details: Same as "get-status" message with all torrent IDs specified.
|
|||
Key: "get-supported"
|
||||
Version: 2
|
||||
Format: list of strings
|
||||
Replies: "failed", "not-supported", "supported"
|
||||
Replies: "failed", "not-supported", "bad-format", "supported"
|
||||
Example: 13:get-supportedl6:lookup8:get-port16:addfile-detailede
|
||||
"get-supported", ("lookup", "get-port", "addfile-detailed")
|
||||
Details: Request that a "supported" message be returned with whichever
|
||||
|
@ -284,7 +294,7 @@ Details: Request that a "supported" message be returned with whichever
|
|||
Key: "get-uplimit"
|
||||
Version: 2
|
||||
Format: value is ignored
|
||||
Replies: "failed", "not-supported", "uplimit"
|
||||
Replies: "failed", "not-supported", "bad-format", "uplimit"
|
||||
Example: 11:get-uplimit0:
|
||||
"get-uplimit", ""
|
||||
Details: Requests that an "uplimit" message be sent back.
|
||||
|
@ -292,7 +302,7 @@ Details: Requests that an "uplimit" message be sent back.
|
|||
Key: "lookup"
|
||||
Version: 2
|
||||
Format: list of strings
|
||||
Replies: "failed", "not-supported", "info"
|
||||
Replies: "failed", "not-supported", "bad-format", "info"
|
||||
Example: 6:lookupl40:0f16ea6965ee5133ea4dbb1e7f516e9fcf3d899ee
|
||||
"lookup", ("0f16ea6965ee5133ea4dbb1e7f516e9fcf3d899e")
|
||||
Details: Request that the server send back an "info" message with "id"
|
||||
|
@ -312,7 +322,7 @@ Details: A list containing information for several torrents. The
|
|||
Key: "noop"
|
||||
Version: 2
|
||||
Format: value is ignored
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 4:noop0:
|
||||
"noop", ""
|
||||
Details: This does nothing but keep the connection alive. With a tag
|
||||
|
@ -330,7 +340,7 @@ Details: Sent in response to a tagged message to indicated that the
|
|||
Key: "pex"
|
||||
Version: 2
|
||||
Format: boolean
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 3:pexi0e
|
||||
"pex", 0
|
||||
Details: Enables or disables peer exchange.
|
||||
|
@ -338,7 +348,7 @@ Details: Enables or disables peer exchange.
|
|||
Key: "port"
|
||||
Version: 2
|
||||
Format: int between 0 and 65535
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 4:porti9090e
|
||||
"port", 9090
|
||||
Details: Change the port the server uses to listen for incoming peer
|
||||
|
@ -347,7 +357,7 @@ Details: Change the port the server uses to listen for incoming peer
|
|||
Key: "quit"
|
||||
Version: 1
|
||||
Format: value is ignored
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 4:quit0:
|
||||
"quit", ""
|
||||
Details: Cause the server to quit. Note that the connection might be
|
||||
|
@ -356,7 +366,7 @@ Details: Cause the server to quit. Note that the connection might be
|
|||
Key: "remove"
|
||||
Version: 2
|
||||
Format: list of torrent ID ints
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 5:removeli3ei8ei6ee
|
||||
"remove", (3, 8, 6)
|
||||
Details: Stop and remove the specified torrents. Note that whether or
|
||||
|
@ -368,7 +378,7 @@ Details: Stop and remove the specified torrents. Note that whether or
|
|||
Key: "remove-all"
|
||||
Version: 2
|
||||
Format: value is ignored
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 10:remove-all0:
|
||||
"remove-all", ""
|
||||
Details: Like "remove" with all torrent IDs specified.
|
||||
|
@ -376,7 +386,7 @@ Details: Like "remove" with all torrent IDs specified.
|
|||
Key: "start"
|
||||
Version: 2
|
||||
Format: list of torrent ID ints
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 5:startli3ei8ei6ee
|
||||
"start", (3, 8, 6)
|
||||
Details: List of torrent IDs to start.
|
||||
|
@ -384,7 +394,7 @@ Details: List of torrent IDs to start.
|
|||
Key: "start-all"
|
||||
Version: 2
|
||||
Format: value is ignored
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 9:start-all0:
|
||||
"start-all", ""
|
||||
Details: Start all torrents.
|
||||
|
@ -400,7 +410,7 @@ Details: Same as "info" message except status type keys are used.
|
|||
Key: "stop"
|
||||
Version: 2
|
||||
Format: list of torrent ID ints
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 4:stopli3ei8ei6ee
|
||||
"stop", (3, 8, 6)
|
||||
Details: List of torrent IDs to stop.
|
||||
|
@ -408,7 +418,7 @@ Details: List of torrent IDs to stop.
|
|||
Key: "stop-all"
|
||||
Version: 2
|
||||
Format: value is ignored
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 8:stop-all0:
|
||||
"stop-all", ""
|
||||
Details: Stop all torrents.
|
||||
|
@ -434,7 +444,7 @@ Details: Sent in response to a "get-supported" message, indicates that
|
|||
Key: "uplimit"
|
||||
Version: 2
|
||||
Format: int
|
||||
Replies: "succeeded", "failed", "not-supported"
|
||||
Replies: "succeeded", "failed", "not-supported", "bad-format"
|
||||
Example: 7:uplimiti20e
|
||||
"uplimit", 20
|
||||
Details: Set the server's upload limit in kilobytes per second.
|
||||
|
|
Loading…
Reference in a new issue