Issue Type: Bug Bug
Affects Versions: 0.8.1
Assignee: Daniel Bevenius
Components: SimplePush-server
Created: 17/Oct/13 4:12 AM
Description:

When using the Raw WebSocket option available in SockJS, our Vert.x implementation returns a binary websocket frame instead of a text websocket frame.
The following is used to specify that the raw WebSocket transport should be used:

var sockjs = new WebSocket('ws://localhost:7777/simplepush/websocket');

We use the following to write to the socket:

sock.write(new Buffer(toJson(helloResponse)));

sock in this case is an instance org.vertx.java.core.sockjs.impl.RawWebSocketTransport, and has only a single write method that takes a Buffer instance. RawWebSocketTransport has a ServerWebSocket that it uses to write the Buffer:

public SockJSSocket write(Buffer data) {
      ws.write(data);
      return this;
}

The above ws.write call will end up in DefaultServerWebSocket.write:

@Override
public ServerWebSocket write(Buffer data) {
    writeBinaryFrame(data);
    return this;
}

This will write a binary WebSocket frame.
We need to investigate if there is some way to specify that the default should be to use text WebSocket frames instead.

Fix Versions: 1.0.0
Project: AeroGear Push
Priority: Major Major
Reporter: Daniel Bevenius
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira