- Jun 6, 2020
- 11,559
- 4,422
Hi I am consuming a REST Web Service using an HttpJob and setting the TimeOut to 6 seconds with this command XJob.GetRequest.Timeout = 6000, this timeout is very important, because it is a heavy duty App and if the WebService takes more than 6 seconds, I need to continue with another process .
But I have been told that this Timeout is only for Connection and that OkHttp has timeout for Connection and Read (
The problem comes when the connection lasts less than 6 seconds, but the WebService response lasts up to 30 seconds, that timeout is controlled by the readTimeout. I found this code in Java, but I don't know Java and how to implement it in B4A:
B4X:
But I have been told that this Timeout is only for Connection and that OkHttp has timeout for Connection and Read (
برای دیدن لینک ها باید ثبت نام کنید
). So when the connection lasts more than 6 seconds, the connection timeout is triggered and everything works fine. The problem comes when the connection lasts less than 6 seconds, but the WebService response lasts up to 30 seconds, that timeout is controlled by the readTimeout. I found this code in Java, but I don't know Java and how to implement it in B4A:
B4X:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید