title: jQuery Web Socket not connecting and not sending
body: <p>I'm trying to convert a PHP function into a jQuery function so that I can use a TCP/IP socket local connection straight from the browser.</p>
  
  <p>I use this:</p>
  
  <pre><code>$socket = @fsockopen('xxx.xxx.xxx.xxx', '8810', $err_no, $err_str);
  
  if(!$socket){
      return 'Errore #'.$err_no.': '.$err_str;
  }else{
      fwrite($socket, '["D";"C";"?ST";200]');
      $read = fread($socket, 2024);
  
       //other stuff...
  
      return $read;
      fclose($socket);
  
  }
  </code></pre>
  
  <p>This works fine. I then downloaded the <a href="https://github.com/dchelimsky/jquery-websocket/" rel="nofollow">Github jQuery Websocket 0.0.4</a> from the Google Code site and followed the example but not successfully.</p>
  
  <p>I just simply tried to make a connection and send data this way:</p>
  
  <pre><code>ws = $.websocket("ws://95.110.224.199:8810/");
  ws.send('string', '["D";"C";"?ST";200]');
  </code></pre>
  
  <p>This gives me "undefined is not a function" error.</p>
  
  <p>I then tried to see if the connection was actually establishing (without sending data) this way:</p>
  
  <pre><code>var ws = $.websocket("ws://xxx.xxx.xxx.xxx:8810/", {
      open: function() {console.log('WS:connesso')},
      close: function() {console.log('WS:chiuso')},
  });
  </code></pre>
  
  <p>No luck for me... the console says nothin'...
  Any hint or help on this? Any help is appreciated.</p>