Websocket problem

Just started using Construct 2? Post your questions here

Post » Sun Nov 01, 2015 12:42 pm

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
B
4
S
2
Posts: 5
Reputation: 410

Post » Sun Nov 01, 2015 2:20 pm

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
B
4
S
2
Posts: 5
Reputation: 410


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests