开发者

Flex RemoteObject timeouts?

开发者 https://www.devze.com 2022-12-09 05:36 出处:网络
I\'ve been tinkering around with Flex RemoteObjects, and I\'ve found that they aren\'t very well behaved with respect to timing out.

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 init开发者_运维百科ial 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消