hhxsv5 / php-sse

A simple and efficient library implemented HTML5's server-sent events by PHP, is used to real-time push events from server to client, and easier than Websocket, instead of AJAX request.
MIT License
426 stars 49 forks source link

Allows callable to stop the loop throwing a StopSSEException #19

Closed mlazze closed 4 years ago

mlazze commented 4 years ago

This allows the callable to stop the loop.

We also may use a return value or a callable parameter passed to the callback to implement this, but the exception was the easiest to implement

hhxsv5 commented 4 years ago

Thanks bro.

hhxsv5 commented 4 years ago

v2.0.1.