Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add io.streams.StreamTransfer::transmit() which yields control after each chunk #344

Merged
merged 1 commit into from
Jun 23, 2024

Conversation

thekid
Copy link
Member

@thekid thekid commented Jun 22, 2024

Example - inside a web handler:

use io\streams\StreamTransfer;

$transfer= new StreamTransfer($file, $buffer);
yield from $transfer->transmit();
$transfer->close();

@thekid thekid merged commit 2e1f262 into xp-framework:main Jun 23, 2024
13 checks passed
@thekid thekid deleted the feature/streamtransfer-yield branch June 23, 2024 07:34
@thekid
Copy link
Member Author

thekid commented Jun 23, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant