From: Miguel A. M. <mig...@ma...> - 2008-03-31 09:24:11
|
We can add on connect DWORD value; int len = sizeof(value); GetSockOpt(SO_SNDBUF, &value, &len); if (value < 65536) { value = 65536; SetSockOpt(SO_SNDBUF, &value, sizeof(value)); } Socket->SndBufSize = value; GetSockOpt(SO_RECBUF, &value, &len); if (value < 65536) { value = 65536; SetSockOpt(SO_RECBUF, &value, sizeof(value)); } Socket->RecBufSize = value; and modify structure: /* #define HB_SENDRECV_BUFFER_SIZE 1400 */ never use more this typedef struct tag_HB_SOCKET_STRUCT { ULONG sign; HB_SOCKET_T com; char *errorDesc; int errorCode; struct sockaddr_in remote; LONG count; int timeout; int timelimit; PHB_ITEM caPeriodic; DWORD SndBufSize; DWORD RecBufSize; } HB_SOCKET_STRUCT; Alexander S.Kresin escribió: > Miguel Angel Marchuet writes: > >> compiler uses hardcoded >> #define HB_SENDRECV_BUFFER_SIZE 1400 >> instead of use >> getsockopt (Windows Sockets) to retrieve the value of socket option SO_MAX_MSG_SIZE >> It makes very slow some transactions, for example FTP, Leto RDD, etc. >> Any body knows why we are using hardcoded 1400 ?. >> > I left it in hbip.c as it was in hbinet.c, because I supposed that > someone who introduced this, had reasons for it, and I simply hadn't > time yet to review this. > >> We can change this ? >> > > Sure. > > Regards, > Alexander. > > ------------------------------------------------------------------------- > 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 > _______________________________________________ > Letodb-developers mailing list > Let...@li... > https://lists.sourceforge.net/lists/listinfo/letodb-developers > |