I try send by block and have the same problem.

Sending ---
try
      FMS.Seek(0, soBeginning);
      Self.SendStr('IMAGE:' + IntToStr(FMS.Size) + sLineBreak);

      iCount := FMS.Read(Buffer[1], BLOCK_SIZE);
      while iCount > 0 do begin
        Self.Send(@Buffer[1], iCount);
        FillChar(Buffer, BLOCK_SIZE, #0);
        Sleep(100);
        if iCount < BLOCK_SIZE then
          iCount := 0
        else
          iCount := FMS.Read(Buffer[1], BLOCK_SIZE);
      end;

    finally

Sent from [ProtonMail](https://protonmail.ch), encrypted email based in 
Switzerland.

> -------- Original Message --------
> Subject: Re: [twsocket] Twsocket Problem over Internet.
> Local Time: November 10, 2017 5:44 PM
> UTC Time: November 10, 2017 7:44 PM
> From: an...@magsys.co.uk
> To: twsocket@lists.elists.org
>
>> HI for all, i do a prototype to transfer a imagem overt internet
>> with Twsocket,
>> but in local network works fine, but when i test with a remote
>> computer in internet connection
>> the file is sended but dont receive or receive a image with lost
>> collor.
>>
>> Your code assumes that Send() will cope with an unlimited amount of
>> data, when there are limits due to the internal buffers.
>>
>> For large sizes, say over 32K, you need to send the data in blocks,
>> waiting until each has been sent, before sending the next. This is
>> illustrated in several sample applications, with each new block being
>> sent when the OnDataSent event is called.
>>
>> Angus
>>
>> --
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to