Giter Club home page Giter Club logo

go-chat's People

Contributors

copilot-37 avatar ethan-well-2 avatar jacklightchen avatar omgzui avatar zero469 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

go-chat's Issues

改进计划

道友的建议:

  1. 代码规范、代码质量、健壮性
  2. 测试代码和性能测试
  3. roadmap

需要改进的

  1. 服务端代码重构之 currentUser 的实现
    2.服务端日志优化

udp打洞

点对点聊天,可以使用udp打洞的形式,将消息记录不经过server吗

你这个明显要改进

并发操作map都不加锁规避下闪退的问题,而且所有在线用户都放在一个 map里面,一个群发消息过来就循环发送,这个时间有考虑么

为啥点对点不能连续发消息?

为啥点对点不能连续发消息?A用户发了一次消息B用户收到了,然后A用户再发消息B用户都不到了,一定要B用户发一条消息后A用户再发消息B用户才能收到,就是不能连续发消息?

Error Occurs When Sending Message to Unlogged User

Reproduction Steps:

Attempt to send a message to a user who is not logged into the application/program.
Notice that an error occurs during the message sending process.

Fix :
//clientConn.go
func (cc ClientConn) IsLoggedInUser(userName string) (bool){
for _, connInfo := range ClientConnsMap{
if userName == connInfo.UserName {
return true
}
}
return false
}

///pointToPointMessageProcess.go
isLoggedInUser := clientConn.IsLoggedInUser(pointToPointMessage.TargetUserName)
if !isExist {
err = fmt.Errorf("not logined user")
return
}


Thanks for your open source golang project. I learned a lot about making chat program by golang.

群发有问题

问题
如图,omgzui用户发送“你好,时间”,oo用户没有收到

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.