ANN (Myth Protocol)

From MythTV Official Wiki
Revision as of 07:30, 16 May 2007 by Jbest (talk | contribs)

Jump to: navigation, search

ANN Playback or ANN Monitor

Present in Protocol Versions

All?

Arguments

Command arguments: <mode> <hostname> <wantevents>

List arguments: none

Examples

Command:

23      ANN Playback sycamore 0

Response:

2       OK

Description

Announces a Playback or Monitor connection to the backend. This should always be the second command sent, after MYTH_PROTO_VERSION. Until the ANN command has successfully been sent, all other commands besides MYTH_PROTO_VERSION, ANN, and DONE will be silently ignored.

A mode of Monitor is the same as Playback except that a Monitor client will not prevent the backend from shutting itself down.

If the client would like to receive broadcast events from the backend wantevents should be "1", otherwise "0".

Returns

Successful response:
OK

ANN FileTransfer

Present in Protocol Versions

All?

Arguments

Command arguments: <mode> <hostname>

List arguments: <url> <user_read_ahead> <retries>

Examples

Command:

58      ANN FileTransfer sycamore[]:[]/2021_20060218193000.mpg.png

Response:

25      OK[]:[]20[]:[]0[]:[]13987

Description

Announces a FileTransfer connection to the backend. This should always be the second command sent, after MYTH_PROTO_VERSION. Until the ANN command has successfully been sent, all other commands besides MYTH_PROTO_VERSION, ANN, and DONE will be silently ignored.

The url is either /<filename> or /channels/<filename> to get a file or a channel icon respectively.

The user_read_ahead and retries values are optional. user_read_ahead can be 1 or 0 and identifies that you want a read-ahead thread.

Once the ANN FileTransfer command has succeeded, data flow over the socket is regulated by QUERY_FILETRANSFER commands. The ANN FileTransfer socket may be used for this, if ANN Playback or ANN Monitor is sent.

Returns

Successful response:
OK[]:[]<socket number>[]:[]<file size high 32 bits>[]:[]<file size low 32 bits>

The socket number must be saved for use in later commands. The file size is a 64 bit number, sent as two 32 bit numbers.