NetTalk Central

Author Topic: Any timeout to set to a NetWebClient ?  (Read 2674 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1844
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Any timeout to set to a NetWebClient ?
« 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?
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11155
    • View Profile
Re: Any timeout to set to a NetWebClient ?
« Reply #1 on: March 21, 2019, 06:46:20 AM »
yes there is a timeout property.

net.InActiveTimeout
defaults to 60 seconds.

Alberto

  • Hero Member
  • *****
  • Posts: 1844
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Any timeout to set to a NetWebClient ?
« Reply #2 on: March 21, 2019, 07:52:59 AM »
Ok, thanks, and any way to detect this timeout was fired to show a message?
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1844
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Any timeout to set to a NetWebClient ?
« Reply #3 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?
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11155
    • View Profile
Re: Any timeout to set to a NetWebClient ?
« Reply #4 on: March 22, 2019, 03:26:13 AM »
>> How to set it to 30 secs?

net.InActiveTimeout = 3000


Alberto

  • Hero Member
  • *****
  • Posts: 1844
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Any timeout to set to a NetWebClient ?
« Reply #5 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?
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11155
    • View Profile
Re: Any timeout to set to a NetWebClient ?
« Reply #6 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