mirror of
https://github.com/sheumann/VNCviewGS.git
synced 2025-01-14 01:29:53 +00:00
Have Marinetti return read data in a new handle.
This should be faster than the other options (reusing an existing handle or using a pointer) because it avoids an extra copy of the data inside Marinetti. For the other options, Marinetti will create a new handle and copy the data to it anyway, but then copy it again into the requested destination.
This commit is contained in:
parent
46a1657580
commit
3a175f9b02
@ -360,11 +360,13 @@ BOOLEAN DoReadTCP (unsigned long dataLength) {
|
||||
if (theSRBuff.srRcvQueued < dataLength)
|
||||
return FALSE;
|
||||
|
||||
if ((tcperr = TCPIPReadTCP(hostIpid, buffTypeHandle, (Ref) readBufferHndl,
|
||||
DisposeHandle(readBufferHndl);
|
||||
if ((tcperr = TCPIPReadTCP(hostIpid, buffTypeNewHandle, NULL,
|
||||
dataLength, &theRRBuff)) != tcperrOK)
|
||||
return FALSE;
|
||||
if (toolerror())
|
||||
return FALSE;
|
||||
readBufferHndl = theRRBuff.rrBuffHandle;
|
||||
|
||||
if (theRRBuff.rrBuffCount != dataLength)
|
||||
return ReadFixup(dataLength, theRRBuff.rrBuffCount);
|
||||
|
Loading…
x
Reference in New Issue
Block a user