title: Flutter WebSockets connect to Socket.io Server
body: <p>I have built a socket.io server using Node.js and Express.  All works fine from browser and normal socket.io client but when I try to use WebSocket in Flutter I get the error</p>
  
  <pre><code>HttpException: Connection closed before full header was received, uri = http://csw.abbadabba.tech:3001
  </code></pre>
  
  <p>I am just trying to get it to work with a basic connect like this:</p>
  
  <pre><code>var _url = 'ws://csw.abbadabba.tech:3001';
  WebSocket chatsocket = await WebSocket.connect(_url);
  chatsocket.add('connect');
  </code></pre>
  
  <p>Looking for anyone who has done this already and has some samples to look at, trying to have a chat server that my app is always connected to, so if there is a better server architecture to use I am open to that as well.  Any help would be great.</p>
  
  <p>Thanks in advance.</p>