• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 HTML Web Socket functionality on itch.io

solarcrispz

Member
Hey guys. After figuring out all the little quirks of porting my buffers and what not to html (html doesn't seem to like float buffers), I got a local browser client (the one gms2 provides with the play button) up and running and connected to a host client version of my game.

But I'm noticing when I try connecting to the server while playing my browser client hosted by itch.io or game jolt, it doesn't seem to connect to my host. It seems to not even make an attempt to connect, instead just eliciting a failure to connect immediately after I prompt a connection.

I figure I'm missing something obvious; I assume it has to do with http security protocols or something to that extent.
What would be an even more obvious pitfall is the fact I'm connecting the working local browser version to my local IP address, so could this just mean I have to look into proper port forwarding / hosting what not?
How would I implement that for a platform like itch.io?

What are my viable work arounds? As mentioned, a local gms2-driven version of my browser client seems to connect just fine.
Thanks for any help. I'm an absolute novice to this kind of stuff.
 

zbox

Member
GMC Elder
I don't think that Websockets obeys CORS so you should be right there - open up the network tab in chrome debug and see what you get?
 

solarcrispz

Member
I don't think that Websockets obeys CORS so you should be right there - open up the network tab in chrome debug and see what you get?
No mention of websocket processed on Firefox Developer when on itch.io. There is one on the local version though.
Thanks for your reply. Where do you think I should go from here?
 

solarcrispz

Member
Update: it seems like game jolt processes the websocket request when looking at Firefox Developer debug mode (maybe because it uses HTTPS?)
It still deems it 'insecure' and doesn't form a connection, but it's a start
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
Update: it seems like game jolt processes the websocket request when looking at Firefox Developer debug mode (maybe because it uses HTTPS?)
It still deems it 'insecure' and doesn't form a connection, but it's a start
There is ws:// and there is wss://, which is websockets with a HTTPS handshake on top. You would generally want the later for pages served over HTTPS.
 

solarcrispz

Member
There is ws:// and there is wss://, which is websockets with a HTTPS handshake on top. You would generally want the later for pages served over HTTPS.
This post was very helpful. It explains why gamevolt allows for connections just fine when playing the browser version through http rather than their optional https. I contacted itch.io to determine if there is a way to opt in to http, I'll post my results so other people going through this can save the head ache.
 
Top