Movatterモバイル変換


[0]ホーム

URL:


menu
  1. Dart
  2. dart:io
  3. Pipe class
Pipe
description

Pipe classabstractinterface

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

On macOS and Linux (excluding Android), either theread orwriteportion of the pipe can be transmitted to another process and used forinterprocess 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);await pipe.write.flush();await pipe.write.close();

Constructors

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

Properties

hashCodeint
The hash code for this object.
no setterinherited
readReadPipe
The read end of thePipe.
no setter
runtimeTypeType
A representation of the runtime type of the object.
no setterinherited
writeWritePipe
The write end of thePipe.
no setter

Methods

noSuchMethod(Invocationinvocation)→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString()String
A string representation of this object.
inherited

Operators

operator ==(Objectother)bool
The equality operator.
inherited

Static Methods

create()Future<Pipe>
  1. Dart
  2. dart:io
  3. Pipe class
dart:io library

[8]ページ先頭

©2009-2025 Movatter.jp