Example #1
0
        public static void WriteMsg(uLink.BitStream stream, object obj, params object[] codecOptions)
        {
            TMsgInfo msg = (TMsgInfo)obj;

            stream.Write <EMsgType>(msg.msgtype);
            stream.Write <int>(msg.sendRoleId);
            stream.Write <int>(msg.recvRoleId);
            stream.Write <string>(msg.msg);
        }
Example #2
0
        public static object ReadMsg(uLink.BitStream stream, params object[] codecOptions)
        {
            TMsgInfo msg = new TMsgInfo();

            msg.msgtype    = stream.Read <EMsgType>();
            msg.sendRoleId = stream.Read <int>();
            msg.recvRoleId = stream.Read <int>();
            msg.msg        = stream.Read <string>();
            return(msg);
        }