0

I am new in here,and I wrote this code but it gives error in console :'ws://127.0.0.1:4502/Broker' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED.Can anybody help me ? I only try samples from internet but they don't work.

$(function () {

        ws = new XSockets.WebSocket("ws://127.0.0.1:4502/Broker");
}
batuhan
  • 5
  • 3

1 Answers1

1
  1. You have to start a XSockets server on localhost and port 4502 (default port for XSockets)
  2. You have to have a controller named broker on in the server. By the connection string it looks like you are trying to connect to a very old version of XSockets. Probably v3.*
  3. Since you are using the "broker" controller I assume that you are trying WebRTC (video/audio). If so... Take a look at this video and download this sample source code afterwards
Uffe
  • 2,275
  • 1
  • 13
  • 9