示例#1
0
        /// <summary>
        /// Send2s the G.
        /// </summary>
        /// <returns><c>true</c>, if G was send2ed, <c>false</c> otherwise.</returns>
        /// <param name="msgNo">Message no.</param>
        /// <param name="data">protobuf object.</param>
        public static bool Send2GS(eMsgTypes type, byte[] msg)
        {
            //IGGDebug.Log("send:" + type);
            NetBuffer Nb = NetCache.GetNetBuffer(msg.Length);

            if (Nb != null)
            {
                Nb.PackBuf(type, msg);
                return(gsConnector.SendToServer(Nb));
            }
            else
            {
                return(false);
            }
        }