def send_commands_to_buffer(self):
        if not self._outgoing_commands:
            return

        packed_data = [self._outgoing_buffer]
        while self._outgoing_commands:
            cmd_type, cmd_args = self._outgoing_commands.popleft()
            packed_command = self._pack_command(cmd_type, cmd_args)
            packed_data.append(packed_command)

        self._outgoing_buffer = ''.join(packed_data)
Sends and packs commands -> buffer
dataset/ETHPy150Open YelpArchive/python-gearman/gearman/connection.py/GearmanConnection.send_commands_to_buffer