NetTalk Central

The Rest Of NetTalk => The Rest - Ask For Help => Topic started by: Alberto on March 20, 2019, 01:17:04 PM

Title: Any timeout to set to a NetWebClient ?
Post by: Alberto on March 20, 2019, 01:17:04 PM
Im posting a WS using NetWebClient but sometimes when the server does not respond it takes mins and mins to stop.
Any way to set  a timeout?
Title: Re: Any timeout to set to a NetWebClient ?
Post by: Bruce on March 21, 2019, 06:46:20 AM
yes there is a timeout property.

net.InActiveTimeout
defaults to 60 seconds.
Title: Re: Any timeout to set to a NetWebClient ?
Post by: Alberto on March 21, 2019, 07:52:59 AM
Ok, thanks, and any way to detect this timeout was fired to show a message?
Title: Re: Any timeout to set to a NetWebClient ?
Post by: Alberto on March 21, 2019, 08:15:27 AM
Ive looked at InActiveTimeout in the docs and didnt found it.
How to set it to 30 secs?
Title: Re: Any timeout to set to a NetWebClient ?
Post by: Bruce on March 22, 2019, 03:26:13 AM
>> How to set it to 30 secs?

net.InActiveTimeout = 3000

Title: Re: Any timeout to set to a NetWebClient ?
Post by: Alberto on March 22, 2019, 07:07:10 AM
And when the 30 secs are over and the ws dows not responds, what is the method fired?
ErrorTrap?
How can I trap this timeout?
Title: Re: Any timeout to set to a NetWebClient ?
Post by: Bruce on March 26, 2019, 11:14:49 PM
On the client side a NET:SimpleIdleConnection will be sent to the .Process method.

eg
 case self.Packet.PacketType
  ! ------------------------------
  of NET:SimpleIdleConnection
  ! ------------------------------
    self.abort()
 end