-- Brad Perkins
`METHOD: A4D_ITK_ReceiveCallback( ` inStream: Longint; ` inStopString: Str255; ` inMaxLen: Longint; ` inTimeout: Longint) -> BLOB
`Part of Active4D, the ultimate 4D web environment `Copyright � Aparajita Fishman, All Rights Reserved
`v4.0.0 build 2 2005-01-22 ` `30-Mar-2005, bdp, Installed into A4D 3.0 ITK Shell
C_LONGINT($1;$inStream;$3;$inMaxLen;$4;$inTimeout) C_STRING(255;$2;$inStopString) C_BLOB($0) $inStream:=$1 $inStopString:=$2 $inMaxLen:=$3 $inTimeout:=$4
C_LONGINT($result) C_BLOB($data) C_BOOLEAN($receivingHeader) $receivingHeader:=(Length($inStopString)>0)
While ($inMaxLen>0)
`Receive up to $inMaxLen bytes, don't release the stream when done, append to $da
$result:=ITK_TCPRecvBlob ($inStream;$data;$inMaxLen;0;3;$inStopString;$inTimeout)
Case of
: ($result<0)
SET BLOB SIZE($0;0)
LONGINT TO BLOB(0;$0;Macintosh byte ordering )
: ($result=0) | ($receivingHeader)
$inMaxLen:=0
Else
$inMaxLen:=$inMaxLen-$result
End case
End while$0:=$data SET BLOB SIZE($data;0)
---------------------------------------------- Is this the right method? Is this code dependent on other shell changes that I probably don't have? _______________________________________________ Active4D-dev mailing list [email protected] http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
