Code Monkey home page Code Monkey logo

Comments (7)

FZambia avatar FZambia commented on May 21, 2024

Have you looked at v0.9.1? It has presence related fix, if it does not help - please provide more information about problem.

BTW, Also look at #129 - huge changes coming, I am removing namespaces and JWT from this lib to make it less restrictive and more extensible (but it will be possible to add the same on top of course)

from centrifuge.

larryclean avatar larryclean commented on May 21, 2024

i will try it. thx. This is a good idea, but I recommend that the setToken method be retained.The authentication of token is given to the user

from centrifuge.

FZambia avatar FZambia commented on May 21, 2024

Yes, that's the idea - I dont want to touch client-server protocol at all (and I have no plans to change it later even for v1 release if it happen) and its possibilities will be the same. Users will be able yo use own permissions and own token parsing logic on server side though.

from centrifuge.

larryclean avatar larryclean commented on May 21, 2024

That's how I use it now.

if e.Token == "" {
		//reply.Error = common.NewError("用户token为空")
		return
	}
	var err error
	data, err := h.TokenT.Valid(e.Token)
	if err != nil {
		reply.Disconnect = centrifuge.DisconnectInvalidToken
		return
	}

from centrifuge.

larryclean avatar larryclean commented on May 21, 2024

@FZambia i use centrifuge to write game server. but I want to know if a user still has a connection in channel. Do you have any good idea?

from centrifuge.

FZambia avatar FZambia commented on May 21, 2024

Cant say without more information, join our chat rooms in Telegram or Discord, will be nice to hear more about your use case

from centrifuge.

FZambia avatar FZambia commented on May 21, 2024

Closing since nothing actionable left here. @Larry-Dev please reopen with detailed description if the problem remains.

from centrifuge.

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.