Skip to content

stream_copy_to_stream: document offset and socket timeout behavior - #5860

Open
lacatoire wants to merge 1 commit into
php:masterfrom
lacatoire:stream-copy-to-stream-offset-timeout
Open

lacatoire wants to merge 1 commit into
php:masterfrom
lacatoire:stream-copy-to-stream-offset-timeout

Conversation

@lacatoire

Copy link
Copy Markdown
Member

The offset description didn't say that 0 (the default) keeps the current position while a positive value seeks from the start of the stream, and nothing mentioned that copying from a blocking socket stops on the stream timeout.

Fixes: #2026
Fixes: #2046
Fixes: #2414

A zero or negative offset keeps the current position, a positive one
seeks from the start of the stream. Copying from a blocking socket stops
when the stream timeout is reached, and false may be returned even though
data has already been written to the destination.
@lacatoire
lacatoire force-pushed the stream-copy-to-stream-offset-timeout branch from 44dddeb to 95d91de Compare September 15, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant