def serve(self):
        """serves a single request (may block)"""
        type, seq, data = self.channel.recv()
        if type == FRAME_RESULT:
            self.dispatch_result(seq, self.box.unpack(data))
        elif type == FRAME_REQUEST:
            self.dispatch_request(seq, *self.box.unpack(data))
        elif type == FRAME_EXCEPTION:
            self.dispatch_exception(seq, self.box.unpack(data))
        else:
            raise ValueError("invalid frame type (%d)" % (type,))