title: LibGDX - Connecting cross-platform clients to a server (HTML5/GWT, iOS, Android and Desktop)
body: <p>Over the weekend I set up all the networking for a game I was making. I was basing it off this tutorial: <a href="http://www.gamefromscratch.com/post/2014/03/11/LibGDX-Tutorial-10-Basic-networking.aspx" rel="nofollow">GamesFromScratch.com Basic LibGDX Networking</a>. It said that it only supported TCP but I was okay with that since I could figure something out and there was a bunch of material online on how to make real time games without UDP. After I finished, I tested it on desktop, android and then on HTML5/GWT. Desktop and android worked but GWT didn't. I did some research and found that Gdx.net does not support GWT, the article didn't warn me :/  Basically now I am trying to find an alternative solution that will work with ALL libgdx platforms.</p>
  
  <p>I looked into Websockets with Socket IO. Here are the Java libraries I found for the: <a href="https://github.com/socketio/socket.io-client-java" rel="nofollow">Client</a> and <a href="https://github.com/mrniko/netty-socketio" rel="nofollow">Server</a>. The server library says it works well with the client one which is reassuring. It seems like a good solution but I have a few questions:</p>
  
  <p><strong>- Would the client library work on all platforms?</strong> It seems that it would work on android and desktop since they don't have to convert to another language but what about GWT and iOS? And not only just work, but also be able to connect to the server using the server library.</p>
  
  <p><strong>- Is there anything I need to watch out for when using websockets?</strong></p>
  
  <p>Thanks.</p>
  
  <p><strong>EDIT:</strong> I did a little bit more research and I found <a href="http://www.eclipse.org/jetty/documentation/current/jetty-websocket-client-api.html" rel="nofollow">Jetty</a>. I looked around and it seems to be GWT compatible, I just need to know if it is also iOS compatible. And could I use Jetty as my server api also?</p>