QUERY FILETRANSFER (Myth Protocol)

From MythTV Official Wiki
Revision as of 21:30, 1 December 2011 by Syphr42 (Talk | contribs)

Jump to: navigation, search

QUERY_FILETRANSFER

Present in Protocol Versions

All?

Arguments

Command arguments: <file socket id>

List arguments: <command>

IS_OPEN

Present in Protocol Versions

All?

Examples

Command:

> QUERY_FILETRANSFER 14[]:[]IS_OPEN

Response:

1

Description

Queries whether a file socket is currently open.

Returns

Successful response:
1

DONE

Present in Protocol Versions

All?

Examples

Command:

> QUERY_FILETRANSFER 14[]:[]DONE

Response:

ok

Description

Closes the file transfer socket

Returns

Always returns
ok

REQUEST_BLOCK

Present in Protocol Versions

All?

Arguments

Command arguments: none

List arguments: <byte count>

Examples

Command:

> QUERY_FILETRANSFER 14[]:[]REQUEST_BLOCK[]:[]10

Response: <count> bytes from the file being transferred

Description

Gets data from the backend

WRITE_BLOCK

Present in Protocol Versions

46 - ?

Arguments

Command arguments: none

List arguments: <byte count>

Examples

Command:

> QUERY_FILETRANSFER 14[]:[]WRITE_BLOCK[]:[]10

Response: <count> bytes transferred

Description

Sends data to the backend

SEEK

Arguments

Command arguments: none

List arguments: <position> <whence> <current position>

Examples

Description

This command wraps the file "seek" function. The position and current position fields are 64 bit integers. This returns a 64 bit integer for the result.

SET_TIMEOUT

Present in Protocol Versions

All?

Arguments

Command arguments: none

List arguments: <whether to have a fast timeout>

Examples

Command:

> QUERY_FILETRANSFER 14[]:[]SET_TIMEOUT[]:[]1

Response:

ok

Description

This command sets whether reading from a file should have a fast or slow timeout. Slow timeouts are used for live TV ring buffers, and is three seconds. Fast timeouts are used for static files, and are 0.12 seconds.

REOPEN

Present in Protocol Versions

70+

Examples

Command:

> QUERY_FILETRANSFER 14[]:[]REOPEN[]:[]filename

Response:

1

Description

Flushes and closes the currently open file. If a filename is given, that file will be opened. Otherwise, the current file will be re-opened. This command only works for write mode transfers.

Returns

Successful response:
1
Unsuccessful response:
0

Changelog

version changeset description
66 [v0.25pre-2052-g1508085]cgitgithub SEEK now uses and returns single 64 bit numbers rather than 64 bit numbers split into two 32 bit numbers.
70 [v0.25pre-2052-g1da9d23]cgitgithub The REOPEN command was added.