Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Event Loop Adapter React Laravel Package

revolt/event-loop-adapter-react

Run ReactPHP libraries on the Revolt event loop. This adapter lets you pass React\EventLoop\Loop::get() where a LoopInterface is required, automatically bridging ReactPHP components to Revolt for a single, unified loop.

View on GitHub
Deep Wiki
Context7

event-loop-adapter-react

Stable License

revolt/event-loop-adapter-react makes any ReactPHP library run on top of the Revolt event loop.

Installation

composer require revolt/event-loop-adapter-react

Usage

Everywhere where a ReactPHP library requires an instance of LoopInterface, you just pass Loop::get() as normal. We automatically set up everything to run the ReactPHP library on the Revolt event loop.

<?php

require 'vendor/autoload.php';

use React\EventLoop\Loop;
use Revolt\EventLoop;

$app = function ($request, $response) {
    $response->writeHead(200, array('Content-Type' => 'text/plain'));
    $response->end("Hello World\n");
};

$socket = new React\Socket\Server(Loop::get());
$http = new React\Http\Server($socket, Loop::get());

$http->on('request', $app);
echo "Server running at http://127.0.0.1:1337\n";

$socket->listen(1337);

EventLoop::run();
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
boundwize/jsonrecast
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata