At 20:55 15.03.2002, you wrote:
>Well, we have this:
>
>php_stream_copy_to_stream(srcstream, deststream, maxlen)
>
>that does that kind of thing :-)
>If maxlen is 0 it copies until EOF.
>It has some sense to use mmap when the source is a plain file too.

Should react on -1 otherwise you cannot call the function in code
where the length is calculated automatically.

Say you have stream a = <length> <data>*<length>

read length
copy_stream_to_stream(length)

now it fails because you expect

if (lngth) copy_strwam_to_stream(length)

regards
marcus

>Howzat?
>
>--Wez.
>
>
>On 16/03/02, "l0t3k" <[EMAIL PROTECTED]> wrote:
> > Wez,
> >     i keep forgetting to ask you to add a "standard" stream copy function
> > (perhaps using a configurable buffer). that way, i can write me a simple
> > streamer by fopening my favorite MP3 and copying it to a socket <g>
> >
> >
> > "Wez Furlong" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Any objections to stream enabling the php_copy_file function;
> > > this will allow copying to/from anything that can be accessed
> > > by the stream "fopen" wrappers?
> > >
> > > --Wez.
> > >
> >
> >
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to