The AMF
The AMF object is used for the sending and receiving of all video/audio data. After the
initial handshake, all objects sent use the AMF structure. Once the AMF structure is
understood, the conversation between the client and the server can be understood.
Below is a connection request sent by the Flash Player. This is the first AMF object sent
by the Flash Player after the initial handshake and is a product of the Action Script call
NetConnection.Connect( ).
THE AMF
03 00 00 01
00 01 05 14 00 00 00 00 02 00 07 63 6f 6e 6e 65
63 74 00 3f f0 00 00 00 00 00 00 03 00 03 61 70
70 02 00 16 73 61 6d 70 6c 65 5f 76 69 64 65 6f
63 6f 6e 66 65 72 65 6e 63 65 00 08 66 6c 61 73
68 56 65 72 02 00 0c 57 49 4e 20 37 2c 30 2c 31
39 2c 30 00 06 73 77 66 55 72 6c 02 00 78 66 69
6c 65 3a 2f 2f 5c 5c 77 6e 6d 69 68 65 72 72 65
73 30 33 5c 63 24 5c 44 6f 63 75 6d 65 6e 74 73
20 61 6e 64 20 53 65 74 c3 74 69 6e 67 73 5c 6d
69 63 6b 2e 68 65 72 72 65 73 2e 4d 49 43 4b 44
4f 4d 41 49 4e 5c 4d 79 20 44 6f 63 75 6d 65 6e
74 73 5c 46 6c 61 73 68 20 50 72 6f 6a 65 63 74
73 5c 56 69 64 65 6f 52 65 70 72 61 63 74 69 63
69 6e 67 2e 73 77 66 00 05 74 63 55 72 6c 02 00
2a 72 74 6d 70 3a 2f 2f 31 39 32 2e 31 36 38 2e
32 2e 31 34 2f 73 61 6d 70 6c 65 5f 76 69 64 65
6f 63 6f 6e 66 65 72 65 6e c3 63 65 00 00 09
Initial Header Byte Bits
0000 0011 -> 0x03
Using the color coding above, the AMF object is broken out as follows:
• 03
o This is the initial header byte of the AMF header.
o It defines 2 things
The size of the AMF header.
• 00 -- The first 2 significant bits of the initial header byte
define the size of the header.
评论0