Hi,
it seems that subprotocol support got broken in vertx 2.1RC3.
Background:
I write a module which is able to use the
http://app.flowhub.io user interface. Its an environment to build flow based applications. It should be used as a ui for vertigo. I could modify the ui code (delete subprotocol and add binary websocket frame support), but than I have to maintain a fork of the ui. I think vertx should support both changes because it is part of the websocket standard to support subprotocols and be able to write text data onto the text channel of a websockt.
Related issue:
https://github.com/eclipse/vert.x/pull/8061. SubprotocolIn DefaultHttpServer line 691:
WebSocketServerHandshakerFactory factory =
new WebSocketServerHandshakerFactory(getWebSocketLocation(ch.pipeline(), request),
null, false,
maxWebSocketFrameSize);
the null argument should be a String containing a csv containing all subprotocols.
And the subprotocol might be exposed via the HttpServer Interface, so that we are able to set the subprotocols.
2. DefaultServerWebSocket.write()The DefaultServerWebSocket.write() (line 152) writes the data onto the binary channel, but it might be more appropriate to write String data (eg. json) onto the text channel of the websocket protocol.