anchor.diff:            if (_verbose)
               log('connecting to $host:$port');
             connection = await Socket.connect(host, port);
  +          // TODO(ianh): need to add something that uses connection.handleError();
             connection.encoding = utf8;
             final StreamBuffer<String> buffer = new StreamBuffer<String>(
               connection.cast<List<int>>().transform(utf8.decoder).transform(const LineSplitter()),
  
positive.code: 
  class StreamBuffer<T> {
    StreamBuffer(Stream<T> stream) {
      stream.listen((T value) {
        _values.add(value);
        if (_signals.isNotEmpty)
          _signals.removeAt(0).complete();
      });
    }
  
    List<T> _values = <T>[];
  
    List<Completer<void>> _signals = <Completer<void>>[];
  
    Future<T> readValue() async {
      if (_values.isEmpty || _signals.isNotEmpty) {
        Completer<void> completer = new Completer<void>();
        _signals.add(completer);
  
negative.code:         _greenRequest = null;
          _yellowRequest = null;
          await Future.wait<void>(tasks);
          await Future<void>.delayed(const Duration(milliseconds: 1000));
        }
      } finally {
        _ledsLocked = false;
  