outputStream property

StreamSink<List<int>> get outputStream

Provides a StreamSink compatible with List

Implementation

StreamSink<List<int>> get outputStream {
  // Create a simple StreamSink wrapper for _socksSocket and
  // _secureSocksSocket that accepts List<int> and forwards it to write method.
  var sink = StreamController<List<int>>();
  sink.stream.listen((data) {
    if (sslEnabled) {
      _secureSocksSocket.add(data);
    } else {
      _socksSocket.add(data);
    }
  });
  return sink.sink;
}