コード例 #1
0
        public override void ReadFrom(Tup.Tars.TarsInputStream _is)
        {
            try
            {
                iVersion     = (short)_is.Read(iVersion, 1, true);
                cPacketType  = (byte)_is.Read(cPacketType, 2, true);
                iMessageType = (int)_is.Read(iMessageType, 3, true);
                iRequestId   = (int)_is.Read(iRequestId, 4, true);
                sServantName = (string)_is.readString(5, true);
                sFuncName    = (string)_is.readString(6, true);

                if (null == cache_sBuffer)
                {
                    cache_sBuffer = new byte[] { 0 };
                }
                sBuffer  = (byte[])_is.Read <byte[]>(cache_sBuffer, 7, true);
                iTimeout = (int)_is.Read(iTimeout, 8, true);

                Dictionary <string, string> cache_context = null;
                context = (Dictionary <string, string>)_is.Read <Dictionary <string, string> >(cache_context, 9, true);
                status  = (Dictionary <string, string>)_is.Read <Dictionary <string, string> >(cache_context, 10, true);
            }
            catch (Exception e)
            {
                QTrace.Trace(this + " ReadFrom Exception: " + e.Message);
                throw e;
            }
        }
コード例 #2
0
 public abstract void ReadFrom(TarsInputStream _is);