title: Sending requests from Browser to Arduino has high latency
body: <p>I have an Arduino Yun connected via the ESP8266 wifi with my laptop. Allowed cross origin data stream to get data from the Arduino using http requests.</p>
  
  <p>The problem with http requests is that it depends on the speed in which the ESP8266 chip can process the request. It's about 750ms.</p>
  
  <p>But what I'm trying to achieve is lightning fast wiresless response between the Arduino and my browser. Is there an alternative?</p>
  
  <p>My javascript code to send data is:</p>
  
  <pre><code>sendToArduin(pin,val){
    // send value to pin
  }
  </code></pre>
  
  <p>And to retrieve data:</p>
  
  <pre><code>requestFromArduino(){
    // returns json string filled with pin&gt;val
  }
  </code></pre>
  
  <p>In a nutshell: I have 6 pins declared as input and 6 pins declared as output. I want the data to fill my javascript variable as real time as possible. (low ms)</p>
  
  <p>Thanks</p>