views:

30

answers:

3

I have PHP script which takes some file (FLV for example) and returns it to Flash player (just opens and reads to end), and I have flash(mxml+as3) app that calls that php script in order to recive a file. Ho to make priorety of that connection so that if user goes to some other web page or dowhloads some file my pair (PHP <-> Flash) will not take over all his http trafik, but share it if it will be needed?

or is bandwath speed limeting on php script side only option?

fell free to edit, sory for my en...

A: 

Are you asking for bandwidth throttling? Then you need to do it from the server side. Flex/AS3 does not allow it.

Adrian Pirvulescu
what about html 5 and JS?
Blender
what do you mean by html5 and JS? ...anyway, if you run php you may throttle the bandwidth somehow with apache. I am not an expert on apache but that should be possible, like it's possible with IIS. you may also take a look over http://en.wikipedia.org/wiki/Bandwidth_throttling
Adrian Pirvulescu
A: 

I don't see how you could prioritize streaming over an http TCP request. Sounds like you need some router settings to be optimized. A small TCP request shouldn't interrupt your streaming anyway.

keyle
A: 

The problem is that you can't set a percentage of bandwidth limit because you don't know the actual bandwidth of the user, unless you make a download test and estimate the bandwidth of the user !

You might also try this : I had a similar issue with Uploading/Downloading from/to my flex app which was causing every RPC or any kind of external loading to be very slow.. the reason : there were too many concurrent request (one permanent, the up/download, which was taking a browser "slot" request, and other variables : the rpc and external loadings).

Therefore, you might consider downloading/uploading from/to a different url :

Your app : www.domain.com/myapp

Your upload url : upload.domain.com

That tricked the browser into thinking it was two different websites and therefore unclogged the pipe to allow other remote connections to the website when navigating in my app.

Fabien