0

It seems cobalt has implemented websocket in src/cobalt/websocket, however the test code below can't work properly (The onopen/onmessage callbacks aren't called).

var wsUri = "ws://echo.websocket.org/";

function testWebSocket()
{
  websocket = new WebSocket(wsUri);
  websocket.onopen = function(evt) { onOpen(evt) };
  websocket.onmessage = function(evt) { onMessage(evt) };
}

function onOpen(evt)
{
  console.log("CONNECTED");
}

function onMessage(evt)
{
  console.log('RESPONSE: ' + evt.data);
}

testWebSocket();

Is websocket feature supported in Cobalt now? I used Cobalt 9.28152 to test.
If not yet, is there any plan to support it?

Thanks!

1 Answers1

0

The master branch is where ongoing work occurs. In this case, the websockets feature is not quite enabled yet. This will be definitely be enabled by the time COBALT_9 is branched off of master.

David Ghandehari
  • 534
  • 3
  • 12