Amp\Parallel\Sync\ChannelledStream class ChannelledStream implements Amp\Parallel\Sync\Channel

An asynchronous channel for sending data between threads and processes.

Supports full duplex read and write.

Summary

Properties

Methods

Properties

Methods

__construct — public function __construct(Amp\ByteStream\InputStream $read, Amp\ByteStream\OutputStream $write)

Creates a new channel from the given stream objects. Note that $read and $write can be the same object.

Type Parameter Description Default Value
Amp\ByteStream\InputStream $read No documentation. none
Amp\ByteStream\OutputStream $write No documentation. none
send — public function send($data): Amp\Promise
No documentation.
Type Parameter Description Default Value
mixed $data No documentation. none
receive — public function receive(): Amp\Promise
No documentation.