Open chenghl666 opened 3 months ago
请问如果我想修改的字节长度大于接收到的封包字节长度,该怎么修改那? bool bSetOK = Socket_Operation.SetByteToIntPtr(bBuff, ipBuff, iLen); 还是说bBuff的长度必须在iLen的范围内修改
SetByteToIntPtr(bBuff, ipBuff, iLen) 这个方法里面的iLen其实就是bBuffer的length,函数的作用是把bBuffer字节数组写入到ipBuff指针指向的非托管内存里面,所以这个函数是不做长度限制的,可以支持任意长度的bBuffer数组,但是你还需要在UI端增加一个修改封包长度的功能,这样就可以实现你想要的功能了
好的,谢谢
请问如果我想修改的字节长度大于接收到的封包字节长度,该怎么修改那? bool bSetOK = Socket_Operation.SetByteToIntPtr(bBuff, ipBuff, iLen);
还是说bBuff的长度必须在iLen的范围内修改