Re: Posting Data from callback function

jacques cerba wrote:

> With w3c-libwww-5.2.1, when using POST, posting of data occurs only at expiration of timeout in select of the event loop.
>
> Setting WWWTRACE = SHOW_THREAD_TRACE in Library/Examples/postform.c we get:
>
>
>  ...
> Event Loop.. calling select: maxfds is 3
> Event Loop.. select returns 0
> Timer....... Dispatch timer 0x806a520
> Posting Data from callback function
> Writing 1Kbytes
> ...
>
> When queuing a lot of POST requests, the same delay ( ~ 1 sec ) occurs for each request.
>
> I am trying to write a client who send en lot of POST requests ( ~ 50/sec ), so can i force the posting of data ?

It's currently a rather conservative value of 2 secs with the somewhat simplistic "exponential backoff" up to 3 secs when
posting or saving data in

    http://www.w3.org/Library/src/HTTP.c

The reason is that this works independently of what type of server it is and it never results in weird TCP interactions.
However, I see your point of it not being a hard coded value but a parameter. I guess that a global parameter for all
requests is sufficient - it is probably unlikely that you want to set it pr request. Something like this in HTTP.c:

PUBLIC void HTTP_setBodyWriteDelay (ms millies)
{
    HTWriteDelay = (millies > 20) ? millies : 20;
}

PUBLIC ms HTTP_bodyWriteDelay (void)
{
    return HTWriteDelay;
}

Henrik

Received on Thursday, 12 November 1998 23:32:52 UTC