title: Firefox Extension Port Listener
body: <p>Hey, I'm trying to get an extension to wait for a xml message from another program over an internal port.  Just something like waiting for a single UTF-8 string that has something like:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;status received="true" state="started"&gt;&lt;/status&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;status received="true" conn="closed"&gt;&lt;/status&gt;
  </code></pre>
  
  <p>I want to reliably report communication between the two, along with some nice little error messages.</p>
  
  <p>The program that I'm sending xml messages to is a completely standalone Java application that runs on the user's machine, the extension is allowing the user to open files using that application through the browser.  The application sends several xml messages out on the port its using(and thus the port the extension is using) when it receives incoming connections and sends out xml status updates.</p>