Websocket problem

  • Hi,

    I have a problem with my construct 2 game connecting to my Web Socket server.

    The server is listening on 192.168.1.128 (my lan PC IP) on port 80, using IIS7. My listener URL is "http://192.168.1.128:80/BJ/". The Client url is "ws://192.168.1.128:80/BJ/" (blank protocol)

    It works perfectly from within the C2 previewer and successfully connects, i.e. the application is loaded into Chrome via the localhost:50000 connection.

    When I export it to my public dropbox folder and run it (from my PC) using the Dropbox public url in Chrome, it does not connect and shows the error: "Unable to create WebSocket with the given address and protocol".

    Fiddler2 shows nothing.

    Is cross domain an issue here? I researched that WebSockets do not apply here.

    Please help! What am I doing wrong?

    Thanks,

    Chris

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I confirmed by that is must be a cross domain issue. I had to installed the exported files into IIS7 using the same "domain", then it connected just fine.

    Not a big deal for now, but I intend to deploy these games in a CDN network and cross domain will become an issue. I will be researching this more....

    /ChrisR

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)