Pipe class Null safety

An anonymous pipe that can be used to send data in a single direction i.e. data written to write can be read using read.

On macOS and Linux (excluding Android), either the read or write portion of the pipe can be transmitted to another process and used for interprocess communication.

For example:

final pipe = await Pipe.create();
final socket = await RawSocket.connect(address, 0);
socket.sendMessage(<SocketControlMessage>[
SocketControlMessage.fromHandles(
    <ResourceHandle>[ResourceHandle.fromReadPipe(pipe.read)])
], 'Hello'.codeUnits);
pipe.write.add('Hello over pipe!'.codeUnits);
pipe.write.close();

Constructors

Pipe.createSync()
Synchronously creates an anonymous pipe.
factory

Properties

hashCode int
The hash code for this object.
read-onlyinherited
read ReadPipe
The read end of the Pipe.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
write WritePipe
The write end of the Pipe.
read-only

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create() Future<Pipe>