07 – Extension-Aware Streaming with FullFlush

Demonstrates how to:

The fullflush extension is useful for real-time streaming scenarios where you want each chunk delivered to the client immediately rather than waiting for TCP buffer fill or Nagle's algorithm.

Quick Start

1. Start the server:

pagi-server --app examples/07-extension-fullflush/app.pl --port 5000

2. Demo with curl:

# Watch real-time streaming with immediate flush
curl -N http://localhost:5000/
# => Chunk 1 (flushed immediately)
# => Chunk 2 (flushed immediately)
# => ...

# Each chunk appears instantly rather than being buffered

Note: The difference from regular streaming is most noticeable with small chunks that would normally be buffered by TCP.

Spec References