This line is filler that is ignored by Doxygen. More...
This line is filler that is ignored by Doxygen.
The MythTV backend process currently opens sockets for three different types of commands; a custom protocol (by default at port 6543), an HTML server (by default http://127.0.0.1:6544/Status for the status, and other services under that, like < HREF="http://127.0.0.1:6544/Myth/GetMusic?Id=1"> http://127.0.0.1:6544/Myth/GetMusic?Id=1 ), and a UPnP media server (several ports that I cannot remember right now that throw around lots of little bits of XML :-)
The custom protocol is an ASCII encoded length and command string. Command sequences can be easily sent to the backend using telnet. e.g.
telnet 127.0.0.1 6543 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'.
21 MYTH_PROTO_VERSION 44 23 ANN Playback hostname 1 10 QUERY_LOAD 4DONE
13 ACCEPT[]:[]442 OK34 0.919922[]:[]0.908203[]:[]0.856445Connection closed by foreign host.
The command string is prefixed by 8 characters, containing the length of the forthcoming command. This can be justified in any way (as the above example shows)
The backend responds with a length, and the response to the command. This can be numbers (up to 32 bit, represented in ASCII), a single string, or an ASCII encoding of a QStringList. The 5 byte sequence "[]:[]" seperates items in the stringlist. Any 64 bit numbers are represented as a stringlist of two 32bit words (MSB first).
There are three main types of networking interactions in MythTV; identification commands (which tell the backend about this client), query commands that are sent to the master backend (e.g. listing recordings or viewing guide data), and file streaming commands (when a frontend is watching or editing a recording).
Until a client is identified to the backend (via the ANN commands), any of the query or file streaming commands will silently fail.
The following summarises some of these commands. For a full understanding of all the commands, either read the source code (programs/mythbackend/mainserver.cpp), or look on the Wiki (http://www.mythtv.org/wiki/Category:Myth_Protocol_Commands).
1.6.3