title: node.js and socket.io. transport type configuration for websocket?
body: <blockquote>
    <p>This question concerns socket.io versions &lt; 0.9.x.
    Newer versions have different transports and methods of setting transports.</p>
  </blockquote>
  
  <p>I test node js and socket.io in two week. when I began I get the problem from <code>socket.send(message)</code> function in client. I can't send any message to the server. But I still can receive messages from the server. I solved this problem when I found the configure transport of server side:</p>
  
  <pre><code>socket.set('transports',[
     'xhr-polling'
    , 'jsonp-polling'
  ]);
  </code></pre>
  
  <p>Everything good. Now I can send messages to the server as well. But I still have a question why I have to configure transport. Default socket.io use websocket transport setting like this:</p>
  
  <pre><code>socket.set('transports', [
      'websocket'
    , 'flashsocket'
    , 'htmlfile'
    , 'xhr-polling'
    , 'jsonp-polling'
  ]);
  </code></pre>
  
  <p>so it uses websocket at first, not xhr-polling. But the server cannot receive any messages sent from the client when using <code>socket.send(msg)</code> even <code>socket.emit(...)</code>.</p>
  
  <p>So the problem is: what is not supporting websocket here? browser or node.js ... I'm sorry but I searched so many pages from google and I haven't found an answer for this.</p>
  
  <p>I use node.js version 0.8.16, socket.io version 0.9.13 and newest browsers: chrome, firefox, opera</p>
  
  <p>I want to use websocket not xhr-polling.</p>