Coder Social home page Coder Social logo

Comments (8)

anoek avatar anoek commented on September 4, 2024

For live games you need to maintain a connection with the websocket, without that the server reasons your browser has gone away and will remove the live challenge.

For correspondence games that's wot the case.

from online-go.com.

anoek avatar anoek commented on September 4, 2024

In specific you'll need to mimic what the official client does for keeping challenges alive: https://github.com/online-go/online-go.com/blob/devel/src/components/ChallengeModal/ChallengeModal.tsx#L715

from online-go.com.

adamreisnz avatar adamreisnz commented on September 4, 2024

I'm creating a challenge via the API, this doesn't use web socket connections?

E.g. I'm intending to use these methods for game management/control: https://ogs.docs.apiary.io/#reference/games/game-movement/make-a-move-in-a-game

Where can I find documentation about the socket implementation?

from online-go.com.

anoek avatar anoek commented on September 4, 2024

You'll need to use the websocket protocol for any game playing (and live challenge keep alives)

If you're going to roll your own websocket implementation https://docs.online-go.com/goban/modules/protocol.html is probably a good start. https://github.com/online-go/goban/tree/main/src/engine/protocol for the typescript defs themselves.

from online-go.com.

adamreisnz avatar adamreisnz commented on September 4, 2024

Thanks, I'll have a look into those.

Does the socket protocol still require an oauth application to be registered etc? Does it use the same authentication mechanism as the API with access tokens?

from online-go.com.

anoek avatar anoek commented on September 4, 2024

You get a jwt from your oauth process and pass that in as part of the authentication process for the websocket

from online-go.com.

adamreisnz avatar adamreisnz commented on September 4, 2024

The token I got from the OAuth process doesn't look like a JWT, it's just a short 30 character random string.
Is there a different OAuth endpoint which issues JWT tokens?

from online-go.com.

anoek avatar anoek commented on September 4, 2024

mm, yeah not the oauth, from the https://online-go.com/api/v1/ui/config that you would get after you're authenticated

from online-go.com.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.