Hmm, I don’t think I know how to help, Other than to say that he server doesn’t seem to be good aty sending messages back, so maybe if you write the rest of the code, you’ll see that it has actualy worked, just not told you?
Could you share the full repo on GitHub or something? This code snippet won’t output anything because you never call connectSocket(), but I’m guessing that was just omitted for brevity.
Note that in params, I set transports: ['websocket'] instead of transport: 'websocket' (see socket.io docs). Also the URL is just 'https://online-go.com'.
I wasn’t able to get the ping/pong to work, but I think that’s because I haven’t sent the "authenticate" message yet. You will likely need to figure out how that works in order to do anything useful. I think that’s where the accessToken gets sent, but I’ve never done it myself…
Thanks!! I was surprised that you don’t need the bearer token to establish the web socket. I will play with the code and work on the making move part.
I think I’m having trouble understanding the question. You’re asking if the demo will be viewable in the browser? I think the answer would be yes. You can get the review id from the XHR response, or you can just go to your profile and look at the newest entry in the Reviews and Demos table.