Android autobahn WebSockets connection lost when connection with dialogic xms

439 Views Asked by At

I am trying to connect to dialogic xms server using autobahn WebSockets: As read I need to add a protocol rtcweb

This is my code :

String uri = "ws://myUrl:port";
        WebSocketConnection ws  = new WebSocketConnection();;
        wsObserver = new WebSocketObserver();
        String[] protocols = {"rtcweb"};
        try {
            ws.connect(new URI(uri), protocols, wsObserver, new WebSocketOptions() );
        } catch (WebSocketException e) {
            e.printStackTrace();
        } catch (URISyntaxException e) {
            e.printStackTrace();
        }

But when i add the protocol rtcweb I get this onClose; and the connection still didn't open :

Code: CONNECTION_LOST. Reason: WebSockets connection lost

0

There are 0 best solutions below