title: Native Messaging postMessage with callback
body: <p>So, I create a port</p>
  
  <pre><code>var port = chrome.runtime.connectNative("my.native.app");
  </code></pre>
  
  <p>And I'll define</p>
  
  <pre><code>port.onMessage.addListener(onNativeMessage);
  port.onDisconnect.addListener(onDisconnect);
  </code></pre>
  
  <p>So when I call</p>
  
  <pre><code>port.postMessage({"text":"messsage"});
  </code></pre>
  
  <p>It goes to my native application using standard in/out and I get my response.</p>
  
  <p><strong>Here's my problem:</strong> I have several functions that expect a response, and others that do not.  I want to be able to post a message and wait for a response from the native application (which is continually running). How is this done?</p>
  
  <p>I am aware of "one time messaging" via <code>sendMessageNative</code> which works great, except I use my native application as a state machine, so it kills my application after it is done, which is no good.</p>