title: netty-socketio read socket.io data?
body: <p>I am using the following project to build a <a href="http://socket.io" rel="nofollow noreferrer">socket.io</a> server: <a href="https://github.com/mrniko/netty-socketio" rel="nofollow noreferrer">https://github.com/mrniko/netty-socketio</a></p>
  
  <p>My server:</p>
  
  <pre><code>public class ServerTest {
      public static void main(String... args) {
          Configuration config = new Configuration();
          config.setPort(8080);
  
          config.setAuthorizationListener(new AuthorizationListener() {
              public boolean isAuthorized(HandshakeData handshakeData) {
                  System.out.println("yes!" + handshakeData.getAddress());
                  return true;
              }
          });
          final SocketIOServer server = new SocketIOServer(config);
  
          server.addEventListener("message", String.class, new DataListener&lt;String&gt;() {
  
              public void onData(SocketIOClient socketIOClient, String s, AckRequest ackRequest) throws Exception {
                  System.out.println("hey");
              }
          });
  
          server.start();
      }
  }
  </code></pre>
  
  <p>I accept all connections, I have tested the connection like this with socket.io javascript client:</p>
  
  <pre><code>var ws = io.connect('localhost:8080');
  ws.on('connect', function() {
      ws.emit('message', "I am a message!");
  });
  </code></pre>
  
  <p>Now, I get the print "hey", but what if I send a data object like this:</p>
  
  <pre><code>ws.emit('message', {data: "I am a message!"});
  </code></pre>
  
  <p>How can I decode this message? Is there a way to debug what object type is being sent to the server?</p>