ghedipunk / PHP-Websockets

A Websockets server written in PHP.
BSD 3-Clause "New" or "Revised" License
913 stars 375 forks source link

Is php-websockets non blocking process? #82

Closed pwFoo closed 7 years ago

pwFoo commented 7 years ago

I'm new with websocket and read about blocking and non blocking solutions... So my question... Is php-websockets non-blocking or blocking solution?

ghedipunk commented 7 years ago

By default, it blocks waiting for new network traffic for up to 1 second per cycle.

There are ways to use a more interrupt driven event loop, such as by using LibEv in place of socket_select that currently drives the default event loop. You can also make it a truly blocking system by removing the timeout.

Closing this because it isn't actually an issue, but if you have more questions, feel free to continue the conversation.