def fetch(self):
        """ Receive exactly one message from the server.
        """
        if self.closed:
            raise ProtocolError("Cannot read from a closed connection")
        if self.defunct:
            raise ProtocolError("Cannot read from a defunct connection")
        raw = BytesIO()
        unpack = Unpacker(raw).unpack
        try:
            raw.writelines(self.channel.chunk_reader())
        except ProtocolError:
            self.defunct = True
            self.close()
            raise
        # Unpack from the raw byte stream and call the relevant message handler(s)
        raw.seek(0)
        response = self.responses[0]
        for signature, fields in unpack():
            if __debug__:
                log_info("S: %s %s", message_names[signature], " ".join(map(repr, fields)))
            if signature in SUMMARY:
                response.complete = True
                self.responses.popleft()
            if signature == FAILURE:
                self.reset()
            handler_name = "on_%s" % message_names[signature].lower()
            try:
                handler = getattr(response, handler_name)
            except AttributeError:
                pass
            else:
                handler(*fields)
        raw.close()
dataset/ETHPy150Open nigelsmall/py2neo/py2neo/packages/neo4j/v1/connection.py/Connection.fetch/original