Miguel Angel Marchuet wrote:
> I put 64k because is the best default option for FTP transfers, is the
> same value
> that is used at FileZilla for example.
> 
> You can change dynamically now this value using
> 
>     InetSetSndBufSize( pSocket, nSizeSendBuffer )
>     InetSetRcvBufSize( pSocket, nSizeReciveBuffer )

Exactly, this is best for FTP!

So, it should not be inside inet.c which is not only ftp, but www, pop3, smtp
and so on.

Instead you, using your just added InetSetSndBuffer(), should set them to 64K
inside tftpclient.prg code if 64K is the best value for _FTP_

> 
> Remember that before my modification we use hard coded 1400 bytes when
> by default
> Inet has 8Kb depending of memory free. Sometimes the buffer is reduced
> automatically
> under 1400bytes, in this cases FTP transfers was failing.

I've just given a quick look at the old code, but, if I'm not wrong, old code
was not setting buffer to 1400 bytes but reading/writing chunks of data of
maximum 1,4Kb in lenght.

> 
> Now we tries to use a minimum of 64kb if is possible to set.
> 
> FTP transfers only use actually half buffer (32kb) to avoid data loss.

So, you first force 64Kb and then set it to 32Kb?!?

As I said, simply set it to 32Kb where it is needed, not inside inet.c

> 
> If you want, you can create a
> 
>     SET DEFAULT_BUFFER_SND_SIZE TO <nSizeSendBuffer>
>     SET DEFAULT_BUFFER_RCV_SIZE TO <nSizeReciveBuffer>
> 
We don't need this! YOU just added the functions needed to change that value
should the need arise.

> To change the default value of 64Kb, But remember than this is actually the
> best tested size possible for FTP transfers.
And three, so, set it inside ftp class.

> Example at Leto RDD:
LetoRDD will set it at the best size for its use of the socket, using your
functions.

> I'm tested all types of transfer, port mode and passive mode, Reducing a
> massive
> transfer from 45 min to 2.4 min (approx).
> 
> What do you think about ?

Good, for ftp. But I think that inside inet.c there should be no size forced
to any value, the OS already buffers data, and surely the size used is the
best value overall.

Best regards.

Maurilio.

-- 
 __________
|  |  | |__| Maurilio Longo
|_|_|_|____| farmaconsult s.r.l.



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to