webSocketClient = new WebSocketClient();
webSocketClient.start();
wsTransport = new JettyWebSocketTransport(null, null, webSocketClient);
bayeuxClient = new BayeuxClient(url, wsTransport);
bayeuxClient.getChannel(someChannel);
bayeauxClient.handshake(handshakeAuthRequest);
Considering the above Java code works (and everything had been declared), how can I specify the Jetty ClientTransportwsTransport in Javascript (node.js)?
I have tried something along the lines of:
var connection = new comet.CometD();
connection.configure({
url: url,
channel: someChannel
}
connection.handshake(handshakeAuthRequest, function (response) {
console.log(response);
});
But I get an Unknown Bayeaux Transport reason for failure, probably because I have no Jetty transport protocol specified anywhere, nor can I find how to do it for javascript. Part of the response below.
{
id: '1',
successful: false,
channel: '/meta/handshake',
failure: {
reason: 'Unknown Bayeux Transport',
exception: undefined,
httpCode: 400,
connectionType: 'long-polling',
......
}