1

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

JoshMc
  • 10,239
  • 2
  • 19
  • 38
user987760
  • 1,061
  • 3
  • 12
  • 26

0 Answers0