Exemple #1
0
    public CMessage Decode(ushort iMsgID, CNetData data)
    {
        DecoderFunc pfnDecode = FindDecodeFunc(iMsgID);

        if (null == pfnDecode)
        {
            return(null);
        }

        return(pfnDecode(ref data));
    }
Exemple #2
0
 public void AddEncode_Decode(ushort iMsgID, EncoderFunc encode, DecoderFunc decode)
 {
     m_Encoder[iMsgID] = encode;
     m_Decoder[iMsgID] = decode;
 }