On 10 sep, 17:00, And <and.bed.w...@gmail.com> wrote:
> Hi,
> I couldn't find a way to set a timeout in GWT RPC call. Am I missing
> something or this is done deliberately?
>
> This feature is essential if your client use the system in low quality
> network. Responses from the server might be lost sometimes and we
> don't want obviously to loose one of two active connections to the
> server.
>
> I see there is nice implementation of timeout (with abort on
> XmlHttpRequest) in RequestBuilder class, so any http request in GWT
> supports timeout. Why I cannot use timeout with RPC? It should be easy
> to implement because RPC uses RequestBuilder anyway (if I understand
> GWT code correctly).
>
> Did anybody cope with this issue?

Because RpcRequestBuilder (suggested by Sri) is a GWT 2.0 thing; if
you're using a GWT "official release" (hoping it is the latest, 1.7),
you can just declare your method in your xxxAsync to return a
RequestBuilder instead of void; then you can set the RequestBuilder's
timeout before calling send() to actually make the call.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to