write method

  1. @override
Future<void> write(
  1. String name,
  2. List<int> bytes
)

Writes bytes unchanged to the stdin of a live long-lived session.

Implementation

@override
Future<void> write(String name, List<int> bytes) async {
  if (!_live.contains(name) || _lifecycles[name] != Lifecycle.longLived) {
    throw SessionNotWritable(name, 'unknown or terminal session');
  }
  writes
      .putIfAbsent(name, () => <List<int>>[])
      .add(List<int>.unmodifiable(bytes));
}