thesis/amp-bridge

Reader/Writer bridge to amphp/socket.

0.1.0 2025-01-16 16:09 UTC

This package is auto-updated.

Last update: 2025-01-17 11:53:49 UTC


README

Installation

composer require thesis/amp-bridge

Basic usage

<?php

declare(strict_types=1);

use Amp\Socket;
use Thesis\AmpBridge\ReaderWriter;

$socket = Socket\connect('tcp://127.0.0.1:5432');

$rw = new ReaderWriter($socket);
$rw->write('test');
echo $rw->read(4);