OLD | NEW |
1 {{+bindTo:partials.standard_nacl_article}} | 1 {{+bindTo:partials.standard_nacl_article}} |
2 | 2 |
3 <section id="messaging-system"> | 3 <section id="messaging-system"> |
4 <span id="message-system"></span><h1 id="messaging-system"><span id="message-sys
tem"></span>Messaging System</h1> | 4 <span id="message-system"></span><h1 id="messaging-system"><span id="message-sys
tem"></span>Messaging System</h1> |
5 <div class="contents local" id="contents" style="display: none"> | 5 <div class="contents local" id="contents" style="display: none"> |
6 <ul class="small-gap"> | 6 <ul class="small-gap"> |
7 <li><a class="reference internal" href="#reference-information" id="id2">Referen
ce information</a></li> | 7 <li><a class="reference internal" href="#reference-information" id="id2">Referen
ce information</a></li> |
8 <li><p class="first"><a class="reference internal" href="#introduction-to-the-me
ssaging-system" id="id3">Introduction to the messaging system</a></p> | 8 <li><p class="first"><a class="reference internal" href="#introduction-to-the-me
ssaging-system" id="id3">Introduction to the messaging system</a></p> |
9 <ul class="small-gap"> | 9 <ul class="small-gap"> |
10 <li><a class="reference internal" href="#design-of-the-messaging-system" id="id4
">Design of the messaging system</a></li> | 10 <li><a class="reference internal" href="#design-of-the-messaging-system" id="id4
">Design of the messaging system</a></li> |
(...skipping 13 matching lines...) Expand all Loading... |
24 <li><p class="first"><a class="reference internal" href="#messaging-in-the-nativ
e-client-module-more-details" id="id10">Messaging in the Native Client module: M
ore details.</a></p> | 24 <li><p class="first"><a class="reference internal" href="#messaging-in-the-nativ
e-client-module-more-details" id="id10">Messaging in the Native Client module: M
ore details.</a></p> |
25 <ul class="small-gap"> | 25 <ul class="small-gap"> |
26 <li><a class="reference internal" href="#implementing-handlemessage" id="id11">I
mplementing HandleMessage()</a></li> | 26 <li><a class="reference internal" href="#implementing-handlemessage" id="id11">I
mplementing HandleMessage()</a></li> |
27 <li><a class="reference internal" href="#implementing-application-specific-funct
ions" id="id12">Implementing application-specific functions</a></li> | 27 <li><a class="reference internal" href="#implementing-application-specific-funct
ions" id="id12">Implementing application-specific functions</a></li> |
28 <li><a class="reference internal" href="#sending-messages-back-to-the-javascript
-code" id="id13">Sending messages back to the JavaScript code</a></li> | 28 <li><a class="reference internal" href="#sending-messages-back-to-the-javascript
-code" id="id13">Sending messages back to the JavaScript code</a></li> |
29 <li><a class="reference internal" href="#sending-and-receiving-other-pp-var-type
s" id="id14">Sending and receiving other <code>pp::Var</code> types</a></li> | 29 <li><a class="reference internal" href="#sending-and-receiving-other-pp-var-type
s" id="id14">Sending and receiving other <code>pp::Var</code> types</a></li> |
30 </ul> | 30 </ul> |
31 </li> | 31 </li> |
32 </ul> | 32 </ul> |
33 | 33 |
34 </div><p>This chapter describes the messaging system used to communicate between
the | 34 </div><p>This section describes the messaging system used to communicate between
the |
35 JavaScript code and the Native Client module’s C or C++ code in a | 35 JavaScript code and the Native Client module’s C or C++ code in a |
36 Native Client application. It introduces the concept of asynchronous | 36 Native Client application. It introduces the concept of asynchronous |
37 programming and the basic steps required to set up a Native Client module | 37 programming and the basic steps required to set up a Native Client module |
38 that sends messages to and receive messages from JavaScript. This chapter | 38 that sends messages to and receive messages from JavaScript. This section |
39 assumes you are familiar with the material presented in the | 39 assumes you are familiar with the material presented in the |
40 <a class="reference internal" href="/native-client/devguide/coding/application-s
tructure.html"><em>Application Structure</em></a> chapter.</p> | 40 <a class="reference internal" href="/native-client/devguide/coding/application-s
tructure.html"><em>Application Structure</em></a> section.</p> |
41 <aside class="note"> | 41 <aside class="note"> |
42 The “Hello, World” example for getting started with NaCl is used her
e to | 42 The “Hello, World” example for getting started with NaCl is used her
e to |
43 illustrate basic programming techniques. You can find this code in | 43 illustrate basic programming techniques. You can find this code in |
44 the <code>/getting_started/part2</code> directory in the Native Client SDK downl
oad. | 44 the <code>/getting_started/part2</code> directory in the Native Client SDK downl
oad. |
45 </aside> | 45 </aside> |
46 <h2 id="reference-information">Reference information</h2> | 46 <h2 id="reference-information">Reference information</h2> |
47 <p>For reference information related to the Pepper messaging API, see the | 47 <p>For reference information related to the Pepper messaging API, see the |
48 following documentation:</p> | 48 following documentation:</p> |
49 <ul class="small-gap"> | 49 <ul class="small-gap"> |
50 <li><a class="reference external" href="/native-client/pepper_stable/cpp/classpp
_1_1_instance">pp::Instance class</a> | 50 <li><a class="reference external" href="/native-client/pepper_stable/cpp/classpp
_1_1_instance">pp::Instance class</a> |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 pp::VarArray keys = dictionary.GetKeys(); | 348 pp::VarArray keys = dictionary.GetKeys(); |
349 // ... | 349 // ... |
350 } else { | 350 } else { |
351 // ... | 351 // ... |
352 } | 352 } |
353 } | 353 } |
354 </pre> | 354 </pre> |
355 </section> | 355 </section> |
356 | 356 |
357 {{/partials.standard_nacl_article}} | 357 {{/partials.standard_nacl_article}} |
OLD | NEW |