/usr/share/doc/red5/html/rtmpt-specification.html is in red5-doc 1.0~svn4374-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | <html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Appendix B. RTMPT Specification</title><link rel="stylesheet" type="text/css" href="html.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Red5 - Reference Documentation"><link rel="up" href="index.html" title="Red5 - Reference Documentation"><link rel="prev" href="rtmp-specification.html" title="Appendix A. RTMP Specification"><link rel="next" href="amf-specification.html" title="Appendix C. AMF Specification"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns="http://www.w3.org/TR/xhtml1/transitional" style="background-color:white;border:none;height:73px;border:1px solid black;"><a style="border:none;" href="http://osflash.org/red5" title="Red5 Open Source Flash Server"><img style="border:none;" src="images/red5-banner.png"></img></a><a style="border:none;" href="http://osflash.org/red5" title="Red5 Open Source Flash Server"><img style="border:none;position:absolute;padding-top:5px;right:42px;" src="images/red5-banner-logo.png"></img></a></div><div class="appendix"><div class="titlepage"><div><div><h1 class="title"><a name="rtmpt-specification"></a>Appendix B. RTMPT Specification</h1></div></div></div>
<p>This document describes the RTMPT tunneling protocol as implemented by the
Red5 Open Source Flash Server. Please note that this document is _not_ an
official specification by Macromedia but hopefully helps other people to
write software that makes use of RTMPT.</p>
<p>RTMPT basically is a HTTP wrapper around the RTMP protocol that is sent using
POST requests from the client to the server. Because of the non-persistent
nature of HTTP connections, RTMPT requires the clients to poll for updates
periodically in order to get notified about events that are generated by the
server or other clients.</p>
<p>During the lifetime of a RTMPT session, four possible request types can be
sent to the server which will be described below.</p>
<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d5e2841"></a>B.1. URLs</h2></div></div></div>
<p>The URL to be opened has the following form::</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
<a class="ulink" href="http://server/" target="_top">http://server/</a><comand>/[<client>/]<index>
</p>
</blockquote></div>
<p>
<code class="literal"><command></code>
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>denotes the RTMPT request type (see below)</p>
</blockquote></div>
<p>
<code class="literal"><client></code>
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>specifies the id of the client that performs the requests (only sent for
established sessions)</p>
</blockquote></div>
<p>
<code class="literal"><index></code>
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>is a consecutive number that seems to be used to detect missing packages</p>
</blockquote></div>
</div>
<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d5e2859"></a>B.2. Request / Response</h2></div></div></div>
<p>All HTTP requests share some common properties:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
<p>They use HTTP 1.1 POST.</p>
</li><li class="listitem">
<p>The content type is
<code class="literal">application/x-fcs</code>.
</p>
</li><li class="listitem">
<p>The connection should be kept alive by the client and server to reduce</p>
</li></ul></div>
<div class="blockquote"><blockquote class="blockquote">
<p> network overhead.</p>
</blockquote></div>
<p>The HTTP responses also share some properties:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
<p>The content type is
<code class="literal">application/x-fcs</code>.
</p>
</li><li class="listitem">
<p>For all established sessions the first byte of the response data controls</p>
</li></ul></div>
<div class="blockquote"><blockquote class="blockquote">
<p> the polling interval of the client where higher values mean less polling
requests.</p>
</blockquote></div>
</div>
<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d5e2881"></a>B.3. Polling interval</h2></div></div></div>
<p>The server always starts with a value of 0x01 after data was returned and
increases it after 10 emtpy replies. The maximum delay is 0x21 which causes
a delay of approximately 0.5 seconds between two requests.</p>
<p>Red5 currently increases the delay in the following steps:
0x01, 0x03, 0x05, 0x09, 0x11, 0x21.</p>
</div>
<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d5e2885"></a>B.4. Initial connect (command "open")</h2></div></div></div>
<p>This is the first request that is sent to the server in order to register a
client on the server and start a new session. The server replies with a unique
id (usually a number) that is used by the client for all future requests.</p>
<p>Note: the reply doesn't contain a value for the polling interval!
A successful connect resets the consecutive index that is used in the URLs.</p>
</div>
<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d5e2889"></a>B.5. Client updates (command "send")</h2></div></div></div>
<p>The data a client would send to the server using RTMP is simply prefixed with
a HTTP header and otherwise sent unmodified.</p>
<p>The server responds with a HTTP response containing one byte controlling the
polling interval and the RTMP data if available.</p>
</div>
<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d5e2893"></a>B.6. Polling requests (command "idle")</h2></div></div></div>
<p>If the client doesn't have more data to send to the server, he has to poll
for updates to receive streaming data or events like shared objects.</p>
</div>
<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d5e2896"></a>B.7. Disconnect of a session (command "close")</h2></div></div></div>
<p>If a client wants to terminate his connection, he sends the "close" command
which is replied with a 0x00 by the server.</p>
</div>
</div><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navfooter"><hr></hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="rtmp-specification.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="amf-specification.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix A. RTMP Specification </td><td width="20%" align="center"><span style="color:white;font-size:90%;"><a href="http://osflash.org/red5" title="Red5">Red5 Open Source Flash Server</a></span></td><td width="40%" align="right" valign="top"> Appendix C. AMF Specification</td></tr></table></div></body></html>
|