Difference between revisions of "MYTH PROTO VERSION (Myth Protocol)"

From MythTV Official Wiki
Jump to: navigation, search
m
Line 2: Line 2:
  
 
=== Arguments ===
 
=== Arguments ===
'''Command arguments''': <client protocol version>
+
'''Command arguments''': <client protocol version> <client protocol token>
  
 
'''List arguments''': none
 
'''List arguments''': none
Line 8: Line 8:
 
=== Examples ===
 
=== Examples ===
 
Command:
 
Command:
<pre>21     MYTH_PROTO_VERSION 26</pre>
+
<pre>30     MYTH_PROTO_VERSION 62 78B5631E</pre>
 
Response:
 
Response:
<pre>13      ACCEPT[]:[]26</pre>
+
<pre>13      ACCEPT[]:[]62</pre>
  
 
=== Description ===
 
=== Description ===
If the version number given matches the protocol version number spoken by the server, the command will succeed. Otherwise, the command will fail.  This should always be the first command sent by a client when it connects to insure that it will be understood by the server.
+
If the version number given matches the protocol version number spoken by the server, the command will succeed. Otherwise, the command will fail.  This should always be the first command sent by a client when it connects to insure that it will be understood by the server.  The token is a simple randomly generated string, to ensure the client has been updated to support the version it claims to use.
  
 
=== Returns ===
 
=== Returns ===
Line 32: Line 32:
 
<pre>21      MYTH_PROTO_VERSION 40
 
<pre>21      MYTH_PROTO_VERSION 40
 
13      ACCEPT[]:[]40</pre>
 
13      ACCEPT[]:[]40</pre>
 +
 +
=== Changelog ===
 +
{| border="1" cellspacing="0" cellpadding="5" style="border-collapse:collapse; border-color:#8eabd0; background:#e7edf5"
 +
|- style="background: lightsteelblue"
 +
|+
 +
! version !! description
 +
|-
 +
| 1
 +
| initial version
 +
|-
 +
| 62
 +
| added protocol token
 +
|-
 +
|}
  
 
[[Category:Myth Protocol Commands]]
 
[[Category:Myth Protocol Commands]]

Revision as of 05:26, 13 September 2010

MYTH_PROTO_VERSION

Arguments

Command arguments: <client protocol version> <client protocol token>

List arguments: none

Examples

Command:

30      MYTH_PROTO_VERSION 62 78B5631E

Response:

13      ACCEPT[]:[]62

Description

If the version number given matches the protocol version number spoken by the server, the command will succeed. Otherwise, the command will fail. This should always be the first command sent by a client when it connects to insure that it will be understood by the server. The token is a simple randomly generated string, to ensure the client has been updated to support the version it claims to use.

Returns

Successful response:

ACCEPT[]:[]<server protocol version>

Unsuccessful response:

REJECT[]:[]<server protocol version>

Telnet

A nice way of testing this is with telnet. Type the following command into a console window on the machine with mythbackend running on it:

telnet localhost 6543

And you should see the following information:

Trying localhost...
Connected to localhost.
Escape character is '^]'.

Now copy and paste the MYTH_PROTO_VERSION command in exactly, hit return and you should see mythbackend respond with either accept or reject.

21      MYTH_PROTO_VERSION 40
13      ACCEPT[]:[]40

Changelog

version description
1 initial version
62 added protocol token