Note that there are some explanatory texts on larger screens.

plurals
  1. POCreate RTMP connection using socket programming
    primarykey
    data
    text
    <p>I need to create RTMP client using java socket programming. I read <a href="http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/rtmp/pdf/rtmp_specification_1.0.pdf" rel="nofollow">this</a> documents and </p> <p><a href="http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/rtmp/pdf/rtmp_specification_1.0.pdf" rel="nofollow">1</a> . I have performed handshaking successfully through java socket programming. </p> <p>Now next step is to send 'connect' command to the server. I am creating RTMP packet as given in document and then writing them to the output stream using DataOutputStream. As per given details 'connect' packect's body should look like as below:</p> <pre><code> (Invoke) “connect” (Transaction ID) 1.0 (Object1) { app: “sample”, flashVer: “MAC 10,2,153,2”, swfUrl: null, tcUrl: “rtmpt://127.0.0.1/sample “, fpad: false, capabilities: 9947.75 , audioCodecs: 3191, videoCodecs: 252, videoFunction: 1 , pageUrl: null, objectEncoding: 3.0 } </code></pre> <p>I could not understood how to convert above into AMF3 encoded bytes. Should I just need to AMF encode "connect:", 1.0 ... and write to OutputStream. Also major problem is that how to encode the object (Given key value pairs). Should I encode&amp; write to socket first keys and then AMF encoded values. Is there need to include &amp; operators between two pairs something like http protocol's body? . I did RnD deeply but could not find the code to create this packet and write to the socket.</p> <p>Please suggest. thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload