ClientGet
This is a message of the Freenet Client Protocol 2.0 (FCP 2.0).
It is sent from a client program to the Freenet node an is used to specify a file to download from Freenet.
Example
ClientGet IgnoreDS=false DSOnly=false URI=KSK@sample.txt Identifier=Request Number One Verbosity=0 ReturnType=direct MaxSize=100 MaxTempSize=1000 MaxRetries=100 PriorityClass=1 Persistence=reboot ClientToken=hello Global=false BinaryBlob=false EndMessage
| Field | Possible values | Mandatory? | Default | Description |
|---|---|---|---|---|
| IgnoreDS | true, false | No | false | Do we ignore the datastore? In the old FCP this was called RemoveLocalKey. |
| DSonly | true, false | No | false | Check only in our local datastore for the file i.e. don't ask other nodes if they have the file. (~= htl 0) |
| URI | A freenet URI | Yes | The URI of the freenet file you want to download e.g. KSK@sample.txt, CHK@zfwLW...Dvs,AAEC--8/ | |
| Identifier | Arbitrary text | Yes | A string to uniquely identify to the client the file you are receiving. | |
| Verbosity | Bitmask. At present only bit 1 is supported. | No | 0 | 0: report when complete, 1: SimpleProgress messages, 2: SendingToNetworkMessage messages |
| MaxSize | A positive integer | No | Maximum size of returned data in bytes. | |
| MaxTempSize | A positive integer | No | Maximum size of intermediary data in bytes. | |
| MaxRetries | An integer, -1 to ? | No | ? | Number of times the node will automatically retry to get the data. -1 means retry forever, and will use ULPRs to maintain the request efficiently. |
| PriorityClass | Number 0 (maximum priority) to 6 (minimum priority) | No | 4 (Bulk offline splitfile fetches, usually to disk) | How to prioritise the download. |
| Persistence | connection, reboot, forever | No | connection | Whether the download stays on the queue across new client connections, Freenet restarts, or forever |
| ClientToken | An arbitrary string | No | Returned in PersistentGet, a hint to the client, so the client doesn't need to maintain its own state. [FIXME: how does this differ from Identifier?] | |
| Global | true, false | No | false | Whether the download is visible on the global queue or not. |
| ReturnType | direct, disk, none | No | direct | direct: return the data directly to the client via an AllData message, once we have all of it. (For persistent requests, the client will get a DataFound message but must send a GetRequestStatus to ask for the AllData). none = don't return the data at all, just fetch it to the node and tell the client when we have finished. disk = write the data to disk. In future, chunked may also be supported (return it in segments as they are ready), but this is not yet implemented. If you download to disk, you have to do a TestDDARequest. |
| BinaryBlob | true, false | No | If true, return the data blocks required to fetch this site as a "binary blob" (.fblob) file. | |
| AllowedMIMETypes | List of allowed MIME types (no parameters) | No | If set, only allow certain MIME types in the returned data. If the data is of a MIME type which isn't listed, the request will fail with a WRONG_MIME_TYPE error (code 29) as soon as it realises this. | |
| Only valid if ReturnType is disk | ||||
| Filename | A filename with full path | Yes | Name and path of the file where the download is to be stored. | |
| TempFilename | A filename with full path | No | Name and path of a temporary file where the partial download is to be stored. | |