java - Create RTMP connection using socket programming -


i need create rtmp client using java socket programming. read this documents ,

1 . have performed handshaking through java socket programming.

now next step send 'connect' command server. creating rtmp packet given in document , writing them output stream using dataoutputstream. per given details 'connect' packect's body should below:

    (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 } 

i not understood how convert above amf3 encoded bytes. should need amf encode "connect:", 1.0 ... , write outputstream. major problem how encode object (given key value pairs). should encode& write socket first keys , amf encoded values. there need include & operators between 2 pairs http protocol's body? . did rnd not find code create packet , write socket.

please suggest. thanks.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -