Code:
Anyone know how to use RSERVER2 to rsGet a large file? I'm only receiving a small portion of the file back. rsPut works great for uploading files to the server. RServer2 is by Don Dickinson. ReadFileFromServer: iRet = rsLof(hSocket, hFile) REM msgbox "Bytes in remote file " + FORMAT$(iRet,"#,") '- Read data from remote file rsSeek hSocket, hFile, 1 ERRCLEAR sReturn = "" sBuffer = "" iRet = rsGet(hSocket, hFile, iRet, sBuffer) sReturn = sBuffer 'place first buffer into sReturn IF iRet = 0 THEN 'attempt receiving rest of data result = tcpSafeReceive(hSocket, BytesToSend - LEN(sReturn), sBuffer) sReturn = sReturn + sBuffer END IF MSGBOX "Bytes received back" + STR$(LEN(sReturn)) rsClose hSocket, hFile rsDisconnect hSocket END FUNCTION
Comment