Re: [twsocket] Compiling with SSL active changes socket behavior

2016-12-06 Thread Éric Fleming Bonilha
"Please see my reply yesterday, or perhaps you are not reading this list."

Angus, I'm sorry, maybe the list is not sending all e-mails to my mail
because I did not receive your reply about our web server, I had to
check on TWSocket achive to see that you replied. I think something
might be blocking the e-mails or the list might not be working well.

Anyway, I'm reading the thread from TWSocket archive now...

Thanks for letting me know our server has issue with .rar files I will
take a look to check it, but glad you already downloaded the file


Eric




On Mon, Dec 5, 2016 at 5:48 PM, Éric Fleming Bonilha 
wrote:

> Angus
>
> I have also uploaded the file to Dropbox: https://www.dropbox.
> com/s/ces533zsvkseghs/ShowModal.rar?dl=0
>
> Eric
>
>
> On Fri, Dec 2, 2016 at 11:44 AM, Éric Fleming Bonilha <
> e...@digifort.com.br> wrote:
>
>> Angus
>>
>> Were you able to download the file?
>>
>> The file at WeTransfer will expire in 4 days
>>
>> Thanks
>>
>>
>
-- 
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

Re: [twsocket] TWsocket transfer TmemoryStream

2016-12-06 Thread François Piette
> Always is needed use the OnDataSent event ?
> I need only transfer the tmemorystream off a Timage1 to Timage2 over
twsocket.

You may send a huge block of data in one Send call. An entire image if you
like. BUT remember TWSocket is asynchronous and transmitting data over the
network takes time. You call to the Send method will return almost
instantly, way long before the data is actually sent: TWSocket will
automatically buffer the data in memory and send it in the background for
you. This may take a lot of memory if you send large data. This may be of no
importance for your application, or it IS important...

When using OnDataSent event, you have control on the size of data that is
memorized. For example you can read your stream 4KB (Any value is OK) at a
time, send that chunk of data and then read the next chunk from the
OnDataSent event, that is the next chunk will be read and put in internal
TWSocket buffer only when previous chunk is sent. This is how the HTTP
component (both client and server) are working to send data. This way it
doesn't matters if a multi GB file is sent. The memory used is always the
size of the chunk your application read.


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
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


Re: [twsocket] TWsocket transfer TmemoryStream

2016-12-06 Thread Angus Robertson - Magenta Systems Ltd
> Always is needed use the OnDataSent event ?
> I need only transfer the tmemorystream off a Timage1 to Timage2 
> over twsocket.

It will probably work on a LAN, as long as BLOCK_SIZE is no more than
64 KBytes, and the server accepts the data immediately it's sent.  

But the proper way is to send chunks in OnDataSent, then you know the
other end is accepting the data.  

The sample OverbyteIcsSender.dpr illustrates how to use OnDataSent to
send the next block.  

Or you could just use my ICS TMagIpLog component, that will send and
receive a stream. 

https://www.magsys.co.uk/delphi/magics.asp

That component also uses OnDataSent to send a stream, if you want to
borrow the code, but using the proper component would be faster. 

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