(roomId int, msg []byte)
| 172 | } |
| 173 | |
| 174 | func (task *Task) broadcastRoomToConnect(roomId int, msg []byte) { |
| 175 | pushRoomMsgReq := &proto.PushRoomMsgRequest{ |
| 176 | RoomId: roomId, |
| 177 | Msg: proto.Msg{ |
| 178 | Ver: config.MsgVersion, |
| 179 | Operation: config.OpRoomSend, |
| 180 | SeqId: tools.GetSnowflakeId(), |
| 181 | Body: msg, |
| 182 | }, |
| 183 | } |
| 184 | reply := &proto.SuccessReply{} |
| 185 | rpcList := RClient.GetAllConnectTypeRpcClient() |
| 186 | for _, rpc := range rpcList { |
| 187 | logrus.Infof("broadcastRoomToConnect rpc %v", rpc) |
| 188 | rpc.Call(context.Background(), "PushRoomMsg", pushRoomMsgReq, reply) |
| 189 | logrus.Infof("reply %s", reply.Msg) |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | func (task *Task) broadcastRoomCountToConnect(roomId, count int) { |
| 194 | msg := &proto.RedisRoomCountMsg{ |
no test coverage detected