{"id":3605,"date":"2016-03-09T10:00:11","date_gmt":"2016-03-09T02:00:11","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=3605"},"modified":"2016-03-13T10:07:28","modified_gmt":"2016-03-13T02:07:28","slug":"qamf-amf-%e6%a0%bc%e5%bc%8f%e5%88%86%e6%9e%90-1-%e8%a7%a3%e6%9e%90%e6%89%93%e5%8c%85%e5%90%8e%e7%9a%84%e6%95%b0%e6%8d%ae%e5%a4%b4%e9%83%a8","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=3605","title":{"rendered":"[QAMF] AMF \u683c\u5f0f\u5206\u6790 1 &#8211; \u89e3\u6790\u6253\u5305\u540e\u7684\u6570\u636e\u5934\u90e8"},"content":{"rendered":"<p>AMF \u683c\u5f0f\u662f Adobe \u63a8\u51fa\u7684\u4e00\u4e2a\u4e8c\u8fdb\u5236\u6570\u636e\u683c\u5f0f\uff0c\u8bf4\u5b9e\u5728\u8bdd\uff0c\u6211\u66f4\u613f\u610f\u7528 MsgPack \u6216 JSON\u3002\u4e0d\u8fc7\u8fd9\u91cc\u4e0d\u8ba8\u8bba\u8fd9\u4e00\u70b9\u3002\u6211\u4eec\u6765\u8ba8\u8bba\u4e00\u4e0b\u4e00\u4e2a\u5b8c\u6574\u7684 AMF \u683c\u5f0f\u6570\u636e\u3002\u8bf4\u5b9e\u5728\u8bdd\uff0c\u6211\u80fd\u8bf4 Adobe \u7684\u5b98\u65b9\u6587\u6863\u5199\u7684\u5f88\u70c2\u5417\uff1f\u8ba9\u4eba\u770b\u7740\u7b80\u76f4\u662f\u5929\u4e66\u4e00\u6837\uff01<\/p>\n<blockquote><p><a href=\"http:\/\/wwwimages.adobe.com\/content\/dam\/Adobe\/en\/devnet\/amf\/pdf\/amf0-file-format-specification.pdf\" target=\"_blank\">AMF 0 \uff1a<\/a>http:\/\/wwwimages.adobe.com\/content\/dam\/Adobe\/en\/devnet\/amf\/pdf\/amf0-file-format-specification.pdf<\/p>\n<p><a href=\"http:\/\/download.macromedia.com\/pub\/labs\/amf\/amf3_spec_121207.pdf\" target=\"_blank\">AMF 3 \uff1a<\/a>http:\/\/download.macromedia.com\/pub\/labs\/amf\/amf3_spec_121207.pdf<\/p><\/blockquote>\n<p>\u6211\u4eec\u8ba8\u8bba AMF \u683c\u5f0f\u7684\u6570\u636e\u65f6\uff0c\u8981\u6ce8\u610f AMF \u683c\u5f0f\u5206\u6210\u4e86\u4e24\u4e2a\u90e8\u5206\uff1a\u6253\u5305\u534f\u8bae\u548c\u5185\u90e8\u6570\u636e\u683c\u5f0f\u534f\u8bae\u3002\u6211\u4eec\u5728\u7f51\u4e0a\u770b\u5230\u7684 AMF 3 \u6807\u51c6\u6587\u6863\u5b9e\u9645\u4e0a\u662f\u5185\u90e8\u7684\u6570\u636e\u683c\u5f0f\u534f\u8bae\uff0c\u5e76\u6ca1\u6709\u5305\u62ec\u6253\u5305\u7684\u5934\u90e8\u5185\u5bb9\u3002<\/p>\n<p>\u6211\u4eec\u4eca\u5929\u6765\u8ba8\u8bba\u4e0b\u8fd9\u4e2a\u6253\u5305\u7684\u5934\u90e8\u5185\u5bb9\u5148\uff1a<\/p>\n<pre class=\"lang:delphi decode:true\">00000000  00 03 00 00 00 01 00 1d 45 78 61 6d 70 6c 65 53           ExampleS\r\n00000010  65 72 76 69 63 65 2f 72 65 74 75 72 6e 4f 6e 65   ervice\/returnOne\r\n00000020  50 61 72 61 6d 00 02 2f 31 00 00 00 3d 0a 00 00   Param  \/1   =   \r\n00000030  00 01 11 0a 0b 0d 6d 79 54 79 70 65 11 61 72 72         myType arr\r\n00000040  61 79 56 61 6c 09 07 01 04 01 04 02 06 07 65 72   ayVal         er\r\n00000050  74 13 73 74 72 69 6e 67 56 61 6c 06 07 62 6c 61   t stringVal  bla\r\n00000060  0d 69 6e 74 56 61 6c 04 02                        intVal<\/pre>\n<ul>\n<li>\u4e24\u4e2a\u5b57\u8282\u7684\u7248\u672c\u6807\u8bb0:00 03\uff0c\u4e5f\u53ef\u80fd\u662f 00 00\uff0cBE \u7f16\u7801\u3002<\/li>\n<li>\u4e24\u4e2a\u5b57\u8282\u7684\u5934\u90e8\u5c0f\u8282\u6570\u91cf\uff1a00 00 \uff0cBE\u7f16\u7801\u3002\u5982\u679c\u4e0d\u4e3a00\uff0c\u5219\u540e\u9762\u8ddf\u5177\u4f53\u7684\u5934\u90e8\u5c0f\u8282\u4fe1\u606f\u3002\u8fd9\u91cc\u4e3a0\uff0c\u6bcf\u4e2a\u5c0f\u8282\u7684\u683c\u5f0f\u4e3a\uff1a<br \/>\n[\u5c0f\u8282\u540d\u79f0:[16\u4f4dBE\u7f16\u7801\u957f\u5ea6][UTF-8\u7f16\u7801\u5b57\u7b26\u4e32\u5185\u5bb9]][8\u4f4d\u5e03\u5c14\u503c\uff0c must-understand \u6807\u8bb0][32\u4f4dBE\u7f16\u7801\u5c0f\u8282\u957f\u5ea6][AMF 0 \u503c]<\/li>\n<li>\u4e24\u4e2a\u5b57\u8282\u7684\u6d88\u606f\u5185\u5bb9\u6570\u636e\u6570\u91cf\uff1a00 01\uff0cBE\u7f16\u7801\u3002\u8fd9\u91cc 00 01 \u8f6c\u6362\u540e\u7684\u7ed3\u679c\u5c31\u662f 1\uff0c\u4e5f\u5c31\u662f\u8bf4\u8fd9\u4e2a\u5934\u90e8\u8868\u660e\u6709 1 \u4e2a\u6570\u636e\u7ed3\u70b9\u3002\u63a5\u4e0b\u6765\u662f\u591a\u4e2a\u6570\u636e\u4f53\u5217\u8868\uff0c\u6bcf\u4e2a\u6570\u636e\u4f53\u7684\u683c\u5f0f\u5982\u4e0b\uff1a<br \/>\n\uff081\uff09\u3001\u8bf7\u6c42\u7684\u76ee\u6807\u670d\u52a1\u540d\u79f0\uff1a[16\u4f4dBE\u7f16\u7801\u5b57\u7b26\u4e32\u957f\u5ea6][UTF-8\u7f16\u7801\u5b57\u7b26\u4e32\u5185\u5bb9]\uff1b<br \/>\n\uff082\uff09\u3001\u670d\u52a1\u54cd\u5e94\u540d\u79f0\uff1a[16\u4f4dBE\u7f16\u7801\u5b57\u7b26\u4e32\u957f\u5ea6][UTF-8\u7f16\u7801\u5b57\u7b26\u4e32\u5185\u5bb9]\uff1b<br \/>\n\u5982\u4e0a\u9762\u8bf7\u6c42\u7684\u76ee\u6807\u670d\u52a1\u540d\u79f0\u90e8\u5206\u4e3a\uff1a00 1d\u00a045 78 61 6d 70 6c 65 53\u00a065 72 76 69 63 65 2f 72 65 74 75 72 6e 4f 6e 65\u00a050 61 72 61 6d\uff0c00 1d \u5c31\u662f\u540d\u79f0\u7684\u957f\u5ea6 29\uff0c\u540e\u9762 29 \u4e2a UTF-8 \u7f16\u7801\u7684\u5b57\u7b26\u6784\u6210\u5b9e\u9645\u7684\u503c\uff1aExampleService\/returnOneParam\u3002\u540c\u7406\uff0c\u540e\u9762\u7684\u54cd\u5e94\u540d\u79f0 00 02 2f 31 \u5bf9\u5e94\u7684\u662f\u957f\u5ea6\u4e3a 2 \u5b57\u8282\u7684\u5b57\u7b26\u4e32 \/1\u3002<br \/>\n\uff083\uff09\u300132\u4f4dBE\u7f16\u7801\u7684\u7684\u6570\u636e\u4f53\u957f\u5ea6 00 00 00 3d \uff0c\u4e5f\u5c31\u662f\u8bf4\u672c\u6570\u636e\u4f53\u5360\u7528\u7684\u7a7a\u95f4\u662f 61 \u5b57\u8282\u3002<br \/>\n\uff084\uff09\u3001AMF 0 \u683c\u5f0f\u7684\u6570\u636e\u4f53\u5185\u5bb9\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u91cc\u6ce8\u610f\u4e00\u4e2a\u95ee\u9898\uff0cAMF \u6570\u636e\u6253\u5305\u662f\u6309\u7167 AMF 0 \u6807\u51c6\u6765\u6253\u5305\u7684\uff0c\u6240\u4ee5\u867d\u7136\u5934\u90e8\u7248\u672c\u53f7\u662f 00 03\uff0c\u5934\u90e8\u548c\u6d88\u606f\u7684\u6570\u636e\u4f53\u4f9d\u7136\u662f\u9ed8\u8ba4\u6309 AMF 0 \u6765\u5f00\u59cb\u89e3\u6790\uff0c\u76f4\u5230\u4f60\u9047\u5230\u4e86\u7c7b\u578b\u4e3a 11 \uff08\u5341\u8fdb\u5236 17 \uff09\u7684\u7c7b\u578b\u6807\u8bb0\uff0c\u4ee5\u5b83\u6807\u8bb0\u7684\u6570\u636e\u624d\u662f AMF 3 \u683c\u5f0f\u7684\u3002\u6211\u4eec\u4ee5\u4e0a\u9762\u7684\u6570\u636e\u5185\u5bb9\u505a\u4e00\u4e0b\u4eba\u5de5\u89e3\u6790\uff1a<\/p>\n<blockquote><p>0a 00 00 00 01 11 0a 0b 0d 6d 79 54 79 70 65 11 61 72 72\u00a061 79 56 61 6c\u00a009 07 01 04 01 04 02 06 07 65 72\u00a074 13 73 74 72 69 6e 67 56 61 6c 06 07 62 6c 61\u00a00d 69 6e 74 56 61 6c 04 02 01<\/p><\/blockquote>\n<ul>\n<li>0a \uff1aAMF 0 \u6570\u7ec4\uff0810\uff09\n<ul>\n<li>00 00 00 01 \uff1a\u6570\u7ec4\u5143\u7d20\u6570\u91cf\u4e3a 1 \uff1b<\/li>\n<li>11 \uff1a\u5207\u6362\u6210 AMF 3 \u5bf9\u8c61\uff0817\uff09\n<ul>\n<li>0a \uff1a\u81ea\u8eab\u7c7b\u578b\u4e3a AMF 3 \u5bf9\u8c61\uff0810\uff09<\/li>\n<li>0b\uff1a\u4e00\u4e2a AMF 3 \u6574\u6570\u7c7b\u578b\uff0c\u7528\u4e8e\u505a\u5bf9\u8c61\u6807\u5fd7\u4f4d\uff0811\uff0c\u4e8c\u8fdb\u5236 1011\uff1a[\u7c7b\u578b\u5c5e\u6027\u6570\u91cf:25\u4f4d][\u52a8\u6001\u7c7b\u578b\u6807\u5fd7][\u5916\u90e8\u7c7b\u578b\u6807\u5fd7][\u5185\u7f6e\u7c7b\u58f0\u660e\u6807\u5fd7][\u5185\u7f6e\u5bf9\u8c61\u6807\u5fd7]\uff09\uff0c\u8fd9\u662f\u4e00\u4e2a\u52a8\u6001\u3001\u5185\u7f6e\u7c7b\u58f0\u660e\u7684\u52a8\u6001\u7c7b\u578b\u3002\u5269\u4e0b\u7684\u4f4d\u6570\u4e3a0\uff0c\u6240\u4ee5\u8fd9\u4e2a\u7c7b\u578b\u6ca1\u6709\u5b50\u7c7b\u578b\u5c5e\u6027\u3002\u5982\u679c\u6709\uff0c\u5219\u6839\u636e AMF3 \u7684\u5b57\u7b26\u4e32\u89c4\u5219\uff0c\u8bfb\u53d6\u6bcf\u4e00\u4e2a\u5c5e\u6027\u540d\u79f0\u5b57\u7b26\u4e32\u3002<\/li>\n<li>0d\uff1a\u4e00\u4e2a AMF 3 \u6574\u6570\u7c7b\u578b\uff0c\u7528\u4e8e\u505a\u7c7b\u578b\u540d\u79f0\u957f\u5ea6\uff0813\uff0c\u6839\u636eAMF 3 \u5b57\u7b26\u4e32\u89c4\u5219\uff0c\u5b9e\u9645\u957f\u5ea6\u4e3a 6 \u5b57\u8282\uff09<\/li>\n<li>6d 79 54 79 70 65\uff1aUTF-8 \u7f16\u7801\u7684\u7c7b\u578b\u540d\u79f0\uff08myType\uff09<\/li>\n<li>11 61 72 72\u00a061 79 56 61 6c\u00a0\uff1a\u5c5e\u6027\u540d\u79f0\u7684 AMF 3 \u5b57\u7b26\u4e32\uff08arrayVal\uff09\n<ul>\n<li>09\uff1aarrayVal \u5c5e\u6027\u7684\u503c\u7c7b\u578b\u4e3a AMF 3 \u6570\u7ec4<\/li>\n<li>07\uff1a\u4e00\u4e2a AMF 3 \u6574\u6570\u7c7b\u578b\uff0c\u7528\u4e8e\u505a\u6570\u7ec4\u6807\u5fd7\u4f4d\uff0c\u6700\u4f4e\u4f4d\u662f\u6570\u7ec4\u662f\u5426\u5185\u7f6e\u6807\u5fd7\uff0c\u5269\u4e0b\u7684\u662f\u5b9e\u9645\u7684\u666e\u901a\u6570\u7ec4\u5143\u7d20\u4e2a\u6570\uff083\uff09\uff0c\u7528\u5b57\u7b26\u4e32\u505a\u952e\u503c\u7684\u6570\u7ec4\u5143\u7d20\u4e0d\u5728\u6b64\u5217\u3002<\/li>\n<li>01\uff1a\u6570\u7ec4\u5143\u7d20\u7684\u952e\u503c\u4e3a 0 \u957f\u5ea6\u7684 AMF 3 \u5b57\u7b26\u4e32\uff08\u4f4e\u4f4d\u662f\u5f15\u7528\u6807\u5fd7\u4f4d\uff09\uff0c\u5982\u679c\u4e0d\u4e3a0\uff0c\u9700\u8981\u5faa\u73af\u8bfb\u53d6\u76f4\u5230\u5185\u5bb9\u5b57\u7b26\u4e32\u5185\u5bb9\u4e3a\u7a7a\u3002<\/li>\n<li>04 01\uff1a\u5143\u7d20\u7c7b\u578b\u4e3a\u6574\u6570\u503c 01<\/li>\n<li>04 02\uff1a\u5143\u7d20\u7c7b\u578b\u4e3a\u6574\u6570\u503c 02<\/li>\n<li>06 07 65 72 74\uff1aAMF3 \u5b57\u7b26\u4e32 ert\uff08\u540e\u9762\u4e0d\u518d\u8be6\u89e3\uff09<\/li>\n<\/ul>\n<\/li>\n<li>13 73 74 72 69 6e 67 56 61 6c\uff1a\u5c5e\u6027\u540d\u79f0\u4e3a AMF 3 \u5b57\u7b26\u4e32 stringVal\n<ul>\n<li>06 07 62 6c 61 \uff1aAMF 3 \u5b57\u7b26\u4e32 bla<\/li>\n<\/ul>\n<\/li>\n<li>0d 69 6e 74 56 61 6c\uff1a\u5c5e\u6027\u540d\u79f0\u4e3a AMF 3 \u5b57\u7b26\u4e32 intVal\n<ul>\n<li>04 02 \uff1a\u5143\u7d20\u5185\u5bb9\u4e3a\u6574\u6570\u503c 02<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u597d\u4e86\uff0c\u8fd9\u5c31\u662f\u4e0a\u9762\u8fd9\u6bb5 AMF \u6570\u636e\u7684\u683c\u5f0f\u5206\u6790\uff0c\u5927\u5bb6\u770b\u660e\u767d\u4e86\u5417\uff1f\u5982\u679c\u4e0d\u660e\u767d\uff0c\u5c31\u5f53\u6211\u6ca1\u8bf4\u597d\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>AMF \u683c\u5f0f\u662f Adobe \u63a8\u51fa\u7684\u4e00\u4e2a\u4e8c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[145,69,8,9],"tags":[564,563],"class_list":["post-3605","post","type-post","status-publish","format-standard","hentry","category-android","category-c-builder","category-delphi","category-qdac","tag-amf","tag-qamf3"],"views":4634,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/3605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3605"}],"version-history":[{"count":5,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/3605\/revisions"}],"predecessor-version":[{"id":3620,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/3605\/revisions\/3620"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}