Code Monkey home page Code Monkey logo

Comments (9)

eric-hon avatar eric-hon commented on June 15, 2024

这个怎么解决?

from goim.

liutaihua avatar liutaihua commented on June 15, 2024

这个描述上下文不足。
uid是logic里的Auth分配的,或者你自己实现其他auth方式。
如果你java连接上来的uid是未知的, 你发消息肯定是发不到它上面去的。

你可以把你的场景描述详细点

from goim.

eric-hon avatar eric-hon commented on June 15, 2024

curl -d "{"test":1}" http://127.0.0.1:7172/1/push?uid=0,把uid改成其他数字,比如10,6108等等,发送消息。
然后在java sdk修改
PushClient cb = new PushClient(InetAddress.getByName("192.168.20.244"), 8080 , 6108, "game");
运行,
无法接收消息

from goim.

eric-hon avatar eric-hon commented on June 15, 2024

如果curl -d "{"test":1}" http://127.0.0.1:7172/1/push?uid=0,uid不做修改,保持为0,java sdk中的uid改成任何数字都可以接收消息

from goim.

eric-hon avatar eric-hon commented on June 15, 2024

java sdk就是goim项目中提供的那个

from goim.

eric-hon avatar eric-hon commented on June 15, 2024

能帮忙解决下为什么只有 uid=0,sdk才能接收消息?

from goim.

liutaihua avatar liutaihua commented on June 15, 2024

你得看看 logic/auth.go里面的Auth方法, 如果你没改过的话。
如果你连接comet的时候,没提供对应的用于auth的body内容,那默认是uid总是0, 不知道你java里连comet的地方是怎么写的。

from goim.

eric-hon avatar eric-hon commented on June 15, 2024

你那有连接的例子吗?发个看看,谢谢!

from goim.

eric-hon avatar eric-hon commented on June 15, 2024

搞定了,呵呵,后面哥有时间就对该项目进行改善

from goim.

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.