PHP OpenSwoole HTTP Server - Async/Sync Events Part 2

1 year ago
2

9 minutes of PHP OpenSwoole HTTP Server

Let's Refactor the Event Structure of our App!

Source: https://github.com/lotharthesavior/sample-swoole/tree/50d466e95d7ef76382bbb110109b5297afab99b9

Previous part: https://youtu.be/yPCEFL0UWgY

- Events

At this video we go over the previous video's Events implementation and refactor it to address limitations and to simplify it. We also go ahead and implement sync events.

Limitations addressed:

- listener parameter types: now we accept complex objects instead of just strings
- execute listener callback on demand instead of using an infinite loop

Loading comments...