Traffic throttling

Traffic throttling

am 21.07.2009 17:31:22 von Michelle Konzack

--=_samba3-27178-1248190567-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello,

since I have not the file store in my webspace for security reason, I
use a php5 script to push it out. It even support "resumeing".

some times ago, there was someone who told me to send out the files in
chunks of, e.g. 1 kByte, which let me know to count the REAL traffic a
client produce...

OK, now the script works perfectly and I am able to delay the sending
between two chunks, but what I need is a milisecond timer, because 1s is
definitively to long.

Is there something in php5 I can use?

Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
Tamay Dogan Network
Debian GNU/Linux Consultant

--=20
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack
c/o Vertriebsp. KabelBW
Blumenstrasse 2
Jabber linux4michelle@jabber.ccc.de 77694 Kehl/Germany
IRC #Debian (irc.icq.com) Tel. DE: +49 177 9351947
ICQ #328449886 Tel. FR: +33 6 61925193

--=_samba3-27178-1248190567-0001-2
Content-Type: application/pgp-signature; name="signature.pgp"
Content-Transfer-Encoding: 7bit
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFKZd9KC0FPBMSS+BIRAh+AAKDGBSjorpkcEUUfhgD7iBVJM/e8bgCd H51L
sX8A95aGMCrs2jW5PT/We1s=
=Jpw8
-----END PGP SIGNATURE-----

--=_samba3-27178-1248190567-0001-2--

Re: Traffic throttling

am 21.07.2009 17:39:30 von Stut

2009/7/21 Michelle Konzack :
> since I have not the file store in my webspace  for  security =
 reason,  I
> use a php5 script to push it out.  It even support "resumeing".
>
> some times ago, there was someone who told me to send out the  files=
 in
> chunks of, e.g. 1 kByte, which let me know to count the REAL  traffi=
c  a
> client produce...
>
> OK, now the script works perfectly and I am able to  delay  the=
 sending
> between two chunks, but what I need is a milisecond timer, because 1s is
> definitively to long.
>
> Is there something in php5 I can use?

http://php.net/usleep

-Stuart

--=20
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Traffic throttling

am 21.07.2009 17:40:38 von daniel danon

--001485f5b1ee8500cd046f3913e9
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

I am not sure I understood you, But...
Use microtime(true/false) to get the time,
And usleep to sleep milliseconds

On Tue, Jul 21, 2009 at 6:31 PM, Michelle Konzack <
linux4michelle@tamay-dogan.net> wrote:

> Hello,
>
> since I have not the file store in my webspace for security reason, I
> use a php5 script to push it out. It even support "resumeing".
>
> some times ago, there was someone who told me to send out the files in
> chunks of, e.g. 1 kByte, which let me know to count the REAL traffic a
> client produce...
>
> OK, now the script works perfectly and I am able to delay the sending
> between two chunks, but what I need is a milisecond timer, because 1s is
> definitively to long.
>
> Is there something in php5 I can use?
>
> Thanks, Greetings and nice Day/Evening
> Michelle Konzack
> Systemadministrator
> Tamay Dogan Network
> Debian GNU/Linux Consultant
>
> --
> Linux-User #280138 with the Linux Counter, http://counter.li.org/
> ##################### Debian GNU/Linux Consultant #####################
> Michelle Konzack
> c/o Vertriebsp. KabelBW
> Blumenstrasse 2
> Jabber linux4michelle@jabber.ccc.de 77694 Kehl/Germany
> IRC #Debian (irc.icq.com) Tel. DE: +49 177 9351947
> ICQ #328449886 Tel. FR: +33 6 61925193
>



--
Use ROT26 for best security

--001485f5b1ee8500cd046f3913e9--

Re: Traffic throttling

am 21.07.2009 17:51:54 von Michelle Konzack

--=_samba3-30418-1248191799-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello Stuart,

Am 2009-07-21 16:39:30, schrieb Stuart:
> http://php.net/usleep

Thank you, that it was.

Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
Tamay Dogan Network
Debian GNU/Linux Consultant

--=20
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack
c/o Vertriebsp. KabelBW
Blumenstrasse 2
Jabber linux4michelle@jabber.ccc.de 77694 Kehl/Germany
IRC #Debian (irc.icq.com) Tel. DE: +49 177 9351947
ICQ #328449886 Tel. FR: +33 6 61925193

--=_samba3-30418-1248191799-0001-2
Content-Type: application/pgp-signature; name="signature.pgp"
Content-Transfer-Encoding: 7bit
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFKZeQaC0FPBMSS+BIRAkj4AJ9k+KIkly6PkB92Lk59oIV5ymxHiwCg hDsb
DjkyCerjY+5B5Q7AgGj0qEc=
=W2/X
-----END PGP SIGNATURE-----

--=_samba3-30418-1248191799-0001-2--