[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Time Out Parm on HTTP_POST_XML()
Hello,
Behzad Hosseinzadeh wrote:
> 1- how it can be used (if there is any example)
>
It's a parameter containing a number of seconds that HTTPAPI should sit
and wait before giving up. You just pass the number of seconds, and if
HTTPAPI can't connect, or is connected but receives no bytes in that
many seconds, it will give up.
> 2- what is the default value
>
Normally, 60 seconds. It's controlled by the HTTP_TIMEOUT constant in
the CONFIG_H source member.
> 3- where I can set a different value as default timeout
> threshold.
You can change the default by editing the CONFIG_H source member and
recompiling everything that uses it (including HTTPAPI itself, just call
the INSTALL program.)
However, I don't really see the value in changing the default... If you
have a particular app that needs a different timeout, just pass a
different number of seconds in that application.
> These are the conditions that I would like to check for in my program
> upon using http_post_xml():
> * If the Web Server is down that I am trying to communicate
That's tricky... HTTPAPI doesn't really know whether the web server is
down. All it knows is whether it can or can't communicate with it. For
example, someone could come and pull out the network cable to the system
running HTTPAPI. The Web server might still be up -- but HTTPAPI can't
communicate with it -- it has know way of knowing whether it's up or not.
> * If the server is up but the webservice program is not
> communicating
Typically, a web service will send you back an error if the server is up
but the application isn't responding. However, that's not something
HTTPAPI has any control over -- it's on the server side.
> * If they are both up but I am not getting any response back
> (timeout)
If HTTPAPI can't get a response, how can it possibly know whether the
server is up?!
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------