コード例 #1
0
ファイル: DotaGCHandler.cs プロジェクト: sy1989/Dota2
        /// <summary>
        ///     Sends a game coordinator message for a specific appid.
        /// </summary>
        /// <param name="msg">The GC message to send.</param>
        /// <param name="appId">The app id of the game coordinator to send to.</param>
        public void Send(IClientGCMsg msg, uint appId)
        {
            var clientMsg = new ClientMsgProtobuf <CMsgGCClient>(EMsg.ClientToGC);

            clientMsg.Body.msgtype = MsgUtil.MakeGCMsg(msg.MsgType, msg.IsProto);
            clientMsg.Body.appid   = appId;

            clientMsg.Body.payload = msg.Serialize();

            Client.Send(clientMsg);
        }