On Thu, 30 Jul 2009, Francesco Saverio Giudice wrote: Hi,
> Previously of last Przemek's hb_socket and of last additions and directory > move, inet version works well (apart from inet internal errors discussed in > last days that could occurs). > Now I would check: > - to fix errors in hrb modules (actually not working, checked fastly path > but there is something else) > - sometimes pages are not displayed (try to force page refresh with F5) > - verify, as per Przemek request, hb_inet() compatibility with previous > version Francesco please make quick test with Harbour code after: 2009-07-29 05:19 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) or better simply take today CVS. The previous version could give unpredictable results in some cases due to "accepted" sockets working in unblocking mode on platforms which inherits BLOCKIO flag from "listening" socket (probably Windows is one of such platforms). Yesterday I compared behavior of old inet functions and current ones end except few fixes in functions you do not use in httpsrv they give the same results. If possible please make such quick with current code and inform me if sth is wrong or it works like before. It will be good if you can make tests with and without USE_HB_INET (BTW now you can compile httpsrv on all platforms in both modes). I need your feedback before I'll commit modifications described below which change the behavior of some hb_inet*() functions. AFAIK hb_inet*() in current SVN should work just like the previous version so if sth is wrong or works in different way then now we should be able easy locate it and fix it. best regards, Przemek 2009-07-29 11:53 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/hbinet.c ! modified hb_inetRecv[All]() to always return number of bytes read if at least one byte was successfully read just like in documentation so it's not longer necessary to use hb_inetCount() to check real number of read bytes. ! modified hb_inetSend[All]() to always return number of written bytes if at least one byte was successfully written so it's not longer necessary to use hb_inetCount() to check real number of written bytes. ! modified hb_inetRecvLine() to return "" on errors and always set numeric value with error code or number of bytes read in 2-nd parameter passed by reference ! modified hb_inetDataReady() to return -1 instead of .F. to indicate errors when socket is not open socket ! modified hb_inetRecvLine() and hb_inetRecvEndBlock() to work like in documentation and set in 2-nd parameter passed by reference the size of read line with line terminator. ! modified hb_inetRecvEndBlock() to always use default EOL when there is no not empty string in passed string parameter or passed array with line terminators ! fixed some small differences between hb_inetRecvLine() and hb_inetRecvEndBlock() * minor: modified hb_inetRecvEndBlock() to use as default EOL s_inetCRLF instead of hardcoded "\r\n" * eliminated some redundant code + added automatic socket initialization in windows builds % added support for read ahead buffer in hb_inetRecvLine() and hb_inetRecvEndBlock() and updated other functions which may interact with it. It greatly improved the speed of code which extensively uses above functions. * harbour/doc/inet.txt ! modified hb_inetAccept() documentation wrongly describing value returned on error when it's NIL _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour