Commit 25976455 authored by hujiebin's avatar hujiebin

feat:rpc多加一个socket命令给你

parent cf5c61b2
......@@ -58,6 +58,8 @@ const (
MsgTypeMatchV2Confirm = 141 // 匹配-v2-确认
MsgTypeMatchV2CallReady = 142 // 匹配-v2-callReady
MsgTypeMatchV2AddTimeGift = 143 // 匹配-v2-送礼加时长
MsgRoomInviteMember = 144 // 邀请用户成为房间会员
MsgDiamondChange = 145 // 钻石数变化
)
const (
......
......@@ -65,3 +65,19 @@ func SendGlobalRocketNotice(groupId string, period string, round uint32, stage u
}
return nil
}
func SendDiamondChange(userId uint64) error {
rspUids, err := multicast([]uint64{userId}, MsgDiamondChange, []byte(""))
//记录socket,注意闭包问题
go func(userId uint64, rspUids []uint64, err error) {
AddRpcLog(MsgDiamondChange, userId, "", rspUids, err)
}(userId, rspUids, err)
if err != nil {
mylogrus.MyLog.Errorf("grpc SendDiamondChange send fail")
return err
} else {
mylogrus.MyLog.Info("grpc SendDiamondChange send success")
}
return nil
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment