Actully, the buffer size you use to transmit receive is not critical at all. It 
has to be large
enoug in orther to not have too much OnDataSent or OnDataAvailable events 
triggeres which would
consume CPU and in case you have a slow CPU, you couldn't sustain the line 
speed when the line speed
is high (such as Gigabit). If the buffer is too large, it is simply a waste on 
memory.

In the http component, the buffer is used in a way that the maximum header line 
must fit into the
receive buffer. A part from that, the buffer could be reduce without 
significant impact.

To send files, it is better to have a buffer which is a multiple of the maximum 
packet size (MTU).
But if you have several physical layers (LAN and PPP for example), it is 
difficult to adjust the
buffer size dynamically. All in all, 4KB is a good value in most situations.

--
Contribute to the SSL Effort. Visit
http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


----- Original Message ----- 
From: "David A. G." <[EMAIL PROTECTED]>
To: <twsocket@elists.org>
Sent: Tuesday, January 17, 2006 1:44 AM
Subject: [twsocket] Buffer size


> Hello all, sorry if this topic was posted some times.
>
> I making a protocol to transfer files via TCP using a mixed mode (binary and
> text).
> I searched in ICS Components for the better buffer size:
>
> in HTTP protocol I found HTTP_SND_BUF_SIZE = 8193
>
> I made tests and this value works great for LAN transferences but using
> internet I (through some linux routers) got blocks always minor than 1423
> bytes.
> I'm doing something bad if I still using 8193 ?   (Delphi 7, WinXP)
>
> thanks
> David
>
> -- 
> 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

-- 
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