Giter VIP home page Giter VIP logo

go-push's Issues

推送问题

大神你好,请问点对点推送,和qq的私聊,还有踢人,将用户从指定房间里踢出去,这些功能怎么实现

windows环境下需要注意的问题

1.读取gateway.json和logic.json的路径需要做出修改:
./gateway.json ==>gateway/cli/gateway.json
./logic.josn ==> logic/cli/logic.json
2.gateway.json中读取证书的路径需要作出修改:
./default.pem ==>gateway/cli/default.pem
3.curl 时需注意在windows环境下的写法为:
curl http://localhost:7799/push/all -d "items=[{"msg": "hi"},{"msg": "bye"}]"

WSConnection的问题:

WSConnection的问题:
readLoop(), writeLoop(), heartbeatChecker(),
这三个方法,按照传统服务端的做法,应该是放在外部,对所有连接统一处理

你的做法是放在WSConnection类,每创建一个WSConnection,都要执行一次,
当有100W用户在线的时候
会有两百W个循环在跑readLoop(), writeLoop()
会有一百W个Timer在检测心跳

是故意这样设计的吗? go的特性?

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.