go-socket.io
go-socket.io copied to clipboard
Use `redis.Pool` to send messages.
-
I changed the publish message in
redisBroadcastfromredis.PubSubConntoredis.Poolbecause I found that sometimes “Use of closed network connection” would appear when publishing and never recover. -
Additionally, I added a special event “ping” to sense the browser’s ping. Here’s an example of how to use it:
SocketServer.OnEvent(model.NameSpace, "ping", func(io IO.Conn) {//todo}
@Degfy loving the fix here. Are you able to rebase this branch on master? Also, you introduced the dep "logrus". There is a logging library already being used. You can check it out here: https://github.com/googollee/go-socket.io/pull/610 Once that's fixed i'll be happy to merge