Hello Arnaldo,
Yes that is another option, but the 1 second delay he had has nothing to
do with it. TCP_NODELAY disable the Nagle algoritm. If my RAM serve me
well Nagle will wait at maximum 100 milliseconds for transmit to see if
something else is coming.
And it will do this delay only if there
You can force socket faster small packet sending by using TWsocket --->
ComponentOptions > wsoTcpNoDelay ---> true
See Microsoft socket help files about possible collateral effects
(search setsockopt TCP_NODELAY)
Larini wrote:
>Why this event must be used?
>I'm testing my application
- Original Message -
From: "Arno Garrels" <[EMAIL PROTECTED]>
To: "ICS support mailing"
Sent: Tuesday, November 01, 2005 12:24 PM
Subject: Re: [twsocket] Send one big or a lot of small strings
> Larini wrote:
>> Hi, I want to know if there are a differen
Larini wrote:
> Why this event must be used?
It's not a must, I'm talking about larger amount of data.
It saves memory because the internal send buffer grows dynamically.
For instance if your string is 1 GB also 1 GB of RAM would be
allocated internally.
It also keeps your application responsive,
Hello Larini,
Time for transfer a packet from one machine to another is depending on
the load of the network.
OnDataSent is prefer to use if you send big amounts of data. You can
however push whole data into TWSocket and it will send it in chuncks for
itself, but if you for example send 100 MB da
Why this event must be used?
I'm testing my application and some times a send of a small packet take 1
second, other times the same packet take about no time. There is a way to
force send anyway?
This
mail was sent by Webmail 2.5
--
To unsubscribe
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 8
Hello Larini,
for winsock it will end up probably the same, but in (2) you are 80
times re-allocating memory and probably copying bytes several times.
if you really dont can create the send buffer at once you can do this:
for a := 0 to 80 do
Socket.PutStringInSendBuffer(MyString);
Socket.Sen
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