anchor.diff:  
   Logger _log = new Logger("dart_fpm.handle_connection");
   
  -handleConnection(Socket socket) {
  +class ConnectionHandler {
  +
  +  Socket socket;
     StreamController<FcgiRecord> managementRecords = new StreamController();
  -  managementRecords.stream.listen((record) {
  -    //TODO: handle management records
  -  });
   
  -  socket.transform(new FcgiRecordTransformer()).transform(new FcgiRequestTransformer(managementRecords)).listen(
  -      (Request request) {
  +  ConnectionHandler(this.socket);
  +
  +  handle() {
  +    managementRecords.stream.listen((record) {
  +      //TODO: handle management records
  +    });
  +
  +    socket
  +        .transform(new FcgiRecordTransformer())
  +        .transform(new FcgiRequestTransformer(managementRecords))
  +        .listen(requestHandler, onError: requestHandler_onError);
  +  }
  +
  +  requestHandler(Request request) {
       Response response = new Response(request.requestId, (response, data) {
         socketAdd(
             socket,
  
positive.code:       }
      });
  
      //IMPORTANT: SEND CONTENT TYPE OF RETURN FIRST!!!
  //    response.header("Content-Type: text/plain; encoding=utf-8");
      response.output.add(request.params.toString());
        response.close();
    }, onError: (data) {
      //TODO: check if stream is already closed (SocketException)
      if (data is SocketException) {
        //clean all available things for this requestID
  
negative.code:       }
        socketAdd(socket, data);
      }
    }
  
    socketAdd(Socket socket, FcgiRecord record) {
      _log.info("<- $record");
  
      socket.add(record.toByteStream());
    }
  
  }
  
  