internal void NotifyAllUser(LobbyMessageDefine id, object msg) { UserServer.Instance.UserProcessScheduler.VisitUsers((UserInfo user) => { NodeMessage retMsg = new NodeMessage(id, user.Guid); retMsg.m_ProtoData = msg; NodeMessageDispatcher.SendNodeMessage(user.NodeName, retMsg); }); }
internal void NotifyUser(ulong guid, LobbyMessageDefine id, object msg) { UserInfo user = GetUserInfo(guid); if (null != user) { NodeMessage retMsg = new NodeMessage(id, guid); retMsg.m_ProtoData = msg; NodeMessageDispatcher.SendNodeMessage(user.NodeName, retMsg); } }
private void RegisterMsgHandler(LobbyMessageDefine id, Type headerType, Type protoType, NodeMessageHandlerDelegate handler) { NodeMessageDispatcher.RegisterMessageHandler((int)id, headerType, protoType, handler); }
internal NodeMessage(LobbyMessageDefine id) { m_ID = (int)id; }
internal NodeMessage(LobbyMessageDefine id, ulong guid) { m_ID = (int)id; SetHeaderWithGuid(guid); }
internal NodeMessage(LobbyMessageDefine id, string account, ulong guid) { m_ID = (int)id; SetHeaderWithAccountAndGuid(account, guid); }
internal NodeMessage(LobbyMessageDefine id, string account) { m_ID = (int)id; SetHeaderWithAccount(account); }