Miguel, yes, I follow what you're saying.
My point is: before: we were using OS provided buffers (which you can retrieve with getsockopt()) and read/write to/from it at 1.4Kb max per operation; we did not care to set socket buffers since OS uses a default size (maybe you have 8Kb default, mine could be bigger or smaller) which is enough for every kind of operation (but sometimes can be under optimal for a given kind of traffic). now: we force 64Kb, then in ftp you reduce it to 32Kb (so why set it at 64Kb inside inet.c if 64Kb can cause data corruption?). After this change, we all have 64Kb forced buffers for every kind of transmission we handle (BTW, code inside inet.c is repeated a couple of times, why not add a single c-only function which receives a socket and sets it at a certain size?). In my opinion a better solution, and a solution which is guaranteed to work at least as good as it was working before, would have been to add SetSocket[Snd/Rcv]Buffer() calls so that if someone needs to change the OS default it can do it from .prg code _but_ leave the code of inet.c as it was. Then, inside ftp client .prg code you could have set buffers to 32Kb since this seems to give better results. Maybe my code works better with smaller buffers, who knows, PPOE, dial-up connections with a small mtu and all the weird thing that are out there. Best regards. Maurilio. Miguel Angel Marchuet wrote: > before this modification, > > the default real buffer was 8kb > > but wrongly Inet only uses hard coded 1,4kb > > and client.prg only was using 1kb of 8kb > > Please, can you test now speed ? > > Is possible that other protocols don't need > 32kb at transfers, but it don't reduce speed. > > > Now we only use 32kb of 64Kb totals to avoid loose data. > > I know that my English is very bad, You follow me now ? > > Best regards, > Miguel Angel Marchuet > > -- __________ | | | |__| 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