stdin property

void stdin=(String line)

The standard input sink.

Implementation

set stdin(String line) {
  final stateValue = _state.value;
  if (stateValue != StockfishState.ready) {
    throw StateError('Stockfish is not ready ($stateValue)');
  }

  final pointer = '$line\n'.toNativeUtf8();
  nativeStdinWrite(pointer);
  calloc.free(pointer);
}