コード例 #1
0
 public void PushStack(byte stk)
 {
     unsafe
     {
         fixed(byte *ptr = &mHandle[0])
         {
             RPC.RPCHeader *header = (RPC.RPCHeader *)ptr;
             header->SetStack((short)mStack++, stk);
         }
     }
 }
コード例 #2
0
 public void SetMethod(byte method)
 {
     unsafe
     {
         fixed(byte *ptr = &mHandle[0])
         {
             RPC.RPCHeader *header = (RPC.RPCHeader *)ptr;
             header->SetMethod(method);
         }
     }
 }
コード例 #3
0
 public void SetSinglePkg()
 {
     unsafe
     {
         fixed(byte *ptr = &mHandle[0])
         {
             RPC.RPCHeader *header = (RPC.RPCHeader *)ptr;
             header->SetSinglePkg();
         }
     }
 }
コード例 #4
0
 public byte GetMethod()
 {
     unsafe
     {
         fixed(byte *ptr = &mHandle[0])
         {
             RPC.RPCHeader *header = (RPC.RPCHeader *)ptr;
             return(header->GetMethod());
         }
     }
 }
コード例 #5
0
 public byte GetStack(short Index)
 {
     unsafe
     {
         fixed(byte *ptr = &mHandle[0])
         {
             RPC.RPCHeader *header = (RPC.RPCHeader *)ptr;
             return(header->GetStack(Index));
         }
     }
 }
コード例 #6
0
 public void Reset()
 {
     unsafe
     {
         fixed(byte *ptr = &mHandle[0])
         {
             RPC.RPCHeader *header = (RPC.RPCHeader *)ptr;
             header->ToDefault();
         }
     }
     mStack = mPos = 0;
 }
コード例 #7
0
        public PackageWriter()
        {
            mHandle = new byte[128 + RPCHeader.SizeOf()];
            unsafe
            {
                fixed(byte *ptr = &mHandle[0])
                {
                    RPC.RPCHeader *header = (RPC.RPCHeader *)ptr;
                    header->ToDefault();
                }
            }

            mBuffSize = 128;
            mStack    = mPos = 0;

            //mPointer = new BYTE[128 + sizeof(RPCHeader)];
            //GetHeader()->ToDefault();
            //mBuffSize = 128;
            //mStack = mPos = 0;
        }