What's the timeout on URLLoader.load connection?

后端 未结 3 970
无人共我
无人共我 2021-01-12 20:39

Is there a timeout on the connection made by URLLoader.load? If there is, what\'s its value, where is it documented and can it be changed? Also, what event (if any) gets dis

3条回答
  •  有刺的猬
    2021-01-12 21:18

    it depends on how the player is running. when embedded into the browser, flash player uses the browser infra structure for HTTP. in consequence, timeouts are handled by the containing browser. standalone player and AIR have their own HTTP implementation. But I have no clue where you can set the timeout.

    However, I guess you can solve the problem yourself. If the timeout is to long, you can simply build your own and cancel the load operation. If it is too short, you can simply encapsulate the loader and do some retries within it.

    If you are intending to hold a connection to the server and don't want it to close due to timeouts, I suggest you have a look at URLStream. Then you can simply send some keep-alive bogus from the server.

提交回复
热议问题