Larini wrote:
> Hi, I want to know if there are a difference between the two codes bellow:
> 
> MyString = 100 bytes
> 
> 1.
> For a:=0 to 80 do
> socket.SendStr(MyString);
> 
> 
> 2.
> For a:=0  to 80 do
> aux:=aux+MyStr;
> socket.SendStr(aux);
> 
> 
> The first one, sends about 8000 bytes using 80 sendstr commands
> The second send about 8000 bytes using only one command.
> 
> There are difference or in the first one will send all together too?

You should understand how Send is working in ICS.
ICS has an internal send buffer. Send() as well as SendStr()
put data into that buffer first before it is real-sent.
The real-send may send it in chunks anyway. 

>From the view of a receiver both of your methods make no difference.

However both are not suggested. There is an event OnDataSent that
should be used to send large amount of data.
You could send the first string and any remaining strings in
OnDataSent.

---
Arno Garrels [TeamICS]



> 
> Thanks.
> 
> ________________________________________________
> This mail was sent
> by Webmail 2.5
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to