1
This commit is contained in:
parent
45ea4ae464
commit
5c5fb4c827
@ -20,6 +20,7 @@ enum CMMessageId_e
|
|||||||
_CMKickoutMember = 114;
|
_CMKickoutMember = 114;
|
||||||
_CMCloseNotify = 115;
|
_CMCloseNotify = 115;
|
||||||
_CMReportPingValue = 116;
|
_CMReportPingValue = 116;
|
||||||
|
_CMGetCurrentRoom = 117;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum SMMessageId_e
|
enum SMMessageId_e
|
||||||
@ -39,6 +40,7 @@ enum SMMessageId_e
|
|||||||
_SMSetPrepare = 112;
|
_SMSetPrepare = 112;
|
||||||
_SMKickoutTeam = 113;
|
_SMKickoutTeam = 113;
|
||||||
_SMKickoutMember = 114;
|
_SMKickoutMember = 114;
|
||||||
|
_SMGetCurrentRoom = 117;
|
||||||
|
|
||||||
_SMRoomMemberChangeNotify = 1001;
|
_SMRoomMemberChangeNotify = 1001;
|
||||||
_SMRoomKickoutNotify = 1002;
|
_SMRoomKickoutNotify = 1002;
|
||||||
|
@ -302,6 +302,16 @@ message CMReportPingValue
|
|||||||
optional int32 ping = 1;
|
optional int32 ping = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//请求当前房间
|
||||||
|
message CMGetCurrentRoom
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
message SMGetCurrentRoom
|
||||||
|
{
|
||||||
|
optional MFCurrentRoom room = 1; //自己所在房间信息
|
||||||
|
}
|
||||||
|
|
||||||
//房间成员信息变更通知
|
//房间成员信息变更通知
|
||||||
message SMRoomMemberChangeNotify
|
message SMRoomMemberChangeNotify
|
||||||
{
|
{
|
||||||
|
@ -262,7 +262,9 @@ func (this *room) CMCloseNotify(hdr *f5.MsgHdr, msg *cs.CMCloseNotify) {
|
|||||||
|
|
||||||
func (this *room) broadcastMsg(msg proto.Message) {
|
func (this *room) broadcastMsg(msg proto.Message) {
|
||||||
for _, m := range(this.members) {
|
for _, m := range(this.members) {
|
||||||
m.hum.SendMsg(msg)
|
if m.hum.GetRoom() == this {
|
||||||
|
m.hum.SendMsg(msg)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user