public void PushStack(byte stk) { unsafe { fixed(byte *ptr = &mHandle[0]) { RPC.RPCHeader *header = (RPC.RPCHeader *)ptr; header->SetStack((short)mStack++, stk); } } }
public void SetMethod(byte method) { unsafe { fixed(byte *ptr = &mHandle[0]) { RPC.RPCHeader *header = (RPC.RPCHeader *)ptr; header->SetMethod(method); } } }
public void SetSinglePkg() { unsafe { fixed(byte *ptr = &mHandle[0]) { RPC.RPCHeader *header = (RPC.RPCHeader *)ptr; header->SetSinglePkg(); } } }
public byte GetMethod() { unsafe { fixed(byte *ptr = &mHandle[0]) { RPC.RPCHeader *header = (RPC.RPCHeader *)ptr; return(header->GetMethod()); } } }
public byte GetStack(short Index) { unsafe { fixed(byte *ptr = &mHandle[0]) { RPC.RPCHeader *header = (RPC.RPCHeader *)ptr; return(header->GetStack(Index)); } } }
public void Reset() { unsafe { fixed(byte *ptr = &mHandle[0]) { RPC.RPCHeader *header = (RPC.RPCHeader *)ptr; header->ToDefault(); } } mStack = mPos = 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; }