How do I make websocket work online?

0 favourites
  • 4 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • Seems an odd question, yes :)

    The thing is, I have my code, and it's working perfectly fine using Websocket when I test the game locally. However, as soon as I upload it to my website and open the index html file, the websocket stops working.

    Does anybody know if there's a certain step I'm missing regarding online websockets? Do they not work on websites, or do I need to give it some special permission?

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • or do I need to give it some special permission?

    Probably. It's going to need https if you don't have it already.

  • I just looked at the debug, and it's showing the error:

    The page at '<URL>' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://irc-ws.chat.twitch.tv/'. This request has been blocked; this endpoint must be available over WSS.

    Seems that it's a less secure version, and I need to use wss instead.

    Now I just need to find a wss for Twitch that works. What a pain :(

    Aaaaaand if anybody is interested, the correct address is:

    "wss://irc-ws.chat.twitch.tv:443"

  • Nice.

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