Flex的RemoteObject的超时? [英] Flex RemoteObject timeouts?

查看:208
本文介绍了Flex的RemoteObject的超时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在摆弄周围的Flex RemoteObjects的,我发现他们没有很好的表现相对于超时。

首先,我想不出如何设置连接超时。我知道我可以设置 requstTimeout ,这将正确超时初始握手后......但是,如果服务器不握手,连接不会超时(例如,​​服务器接受连接,然后什么也不做它,客户端将只留下挂)。

二,当的requestTimeout 火灾(超时请求),Flex不会真正采取任何措施来推倒连接 - 它只是离开它挂在那里(没有 RST 等)。显然,这是多一点点不可取的。有没有什么办法可以明确地推倒超时后的连接?

我使用的RemoteObject 是这样的:

 < RemoteObject的ID =foo的终点=HTTP://栏应为requestTimeout =42>
    <方法... />
< / RemoteObject的>
 

解决方案

我相信你可以听一个FaultEvent(即由超时触发),并在处理程序杀死了连接。

没有潜入源,我不知道如何可以设置连接超时。

I've been tinkering around with Flex RemoteObjects, and I've found that they aren't very well behaved with respect to timing out.

First, I can't figure out how to set a timeout on "connect". I know I can set requstTimeout, which will correctly timeout after an initial handshake… But if the server doesn't handshake, the connection doesn't time out (eg, the server accepts the connection, then does nothing with it, the client will just be left hanging).

Second, when a requestTimeout fires (timing out the request), Flex doesn't actually take any steps to tear down the connection – it just leaves it hanging there (no RST or the like). Clearly, this is more than a little bit undesirable. Is there any way to explicitly tear down the connection after the timeout?

I am using RemoteObject like this:

<RemoteObject id="foo" endpoint="http://bar" requestTimeout="42">
    <method … />
</RemoteObject>

解决方案

I believe you can listen for a faultEvent (That is triggered by the timeout) and have the connection killed in the handler.

Without diving into the source, I'm not sure how to set the connect timeout either.

这篇关于Flex的RemoteObject的超时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆