Spec-Zone.ru › Dart 2

dart:io

Pipe class

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()
factory
Synchronously creates an anonymous pipe.

Properties

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

Methods

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

Operators

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

Static Methods

create() → Future<Pipe>

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-io/Pipe-class.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API