NAME
gearman_client_do - Single Task Interface
SYNOPSIS
#include <libgearman/gearman.h>
void *gearman_client_do(gearman_client_st *client, const char
*function_name, const char *unique, const void *workload, size_t
workload_size, size_t *result_size, gearman_return_t *ret_ptr);
DESCRIPTION
Run a single task and return an allocated result. *
PARAMETERS
[in] client Structure previously initialized with
gearman_client_create() or gearman_client_clone().
[in] function_name The name of the function to run.
[in] unique Optional unique job identifier, or NULL for a new
UUID.
[in] workload The workload to pass to the function when it is
run.
[in] workload_size Size of the workload.
[out] result_size The size of the data being returned.
[out] ret_ptr Standard gearman return value. In the case of
GEARMAN_WORK_DATA, GEARMAN_WORK_WARNING, or GEARMAN_WORK_STATUS,
the caller should take any actions to handle the event and then
call this function again. This may happen multiple times until a
GEARMAN_WORK_ERROR, GEARMAN_WORK_FAIL, or GEARMAN_SUCCESS (work
complete) is returned. For GEARMAN_WORK_DATA or
GEARMAN_WORK_WARNING, the result_size will be set to the
intermediate data chunk being returned and an allocated data
buffer will be returned. For GEARMAN_WORK_STATUS, the caller can
use gearman_client_do_status() to get the current tasks status.
RETURN VALUE
The result allocated by the library, this needs to be freed when the
caller is done using it.
SEE ALSO
The Gearman homepage: http://www.gearman.org/
BUGS
Bugs should be reported at https://bugs.launchpad.net/gearmand
COPYING
Copyright (C) 2008 Brian Aker, Eric Day. All rights reserved.
Use and distribution licensed under the BSD license. See the COPYING
file in the original source for full text.