clue · GitHub

This changeset simplifies usage by supporting the new Socket API without nullable loop arguments.

// old
$http = new React\Http\HttpServer($handler);
$http->listen(new React\Socket\Server(8080));
// new
$http = new React\Http\HttpServer($handler);
$http->listen(new React\Socket\SocketServer('127.0.0.1:8080'));

Note that this doesn't affect the API of this package at all, but does use the improved API of the referenced Socket component. Existing code continues to work as is.

Together with #418, #417 and #410, this means we can now fully rely on the default loop and no longer need to skip any arguments with null values. Additionally, this now consistently uses the HttpServer and SocketServer class names to avoid class name collisions and ambiguities.

Read the original on github.com ↗