Registry / networking / react-socket

react-socket

JSON →
library1.17.0phppackagistunverified

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP

composer require react/socket
INSTALL
IMPORT
SIG · REACT-SOCKET
R
react-socket
networkingphpv1.17.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Connector
use React\Socket\Connector;

Connect to a TCP server asynchronously.

use React\Socket\Connector; use React\EventLoop\Factory; $loop = Factory::create(); $connector = new Connector($loop); $connector->connect('tcp://example.com:80')->then(function ($connection) { $connection->write("GET / HTTP/1.0\r\n\r\n"); }); $loop->run();
Debug
Known issues
gotchaRequires PHP 7.1+ and ext-event or ext-libevent for best performance.
fix
Install required extensions or use the default stream-based loop.
affects: >=1.0
Upgrade
Version history
1.17.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Resources
react-socket — pip install react-socket · libregistry