~clint-fewbar/ubuntu/precise/gearmand/drop-unneeded-patches

« back to all changes in this revision

Viewing changes to docs/man/gearman_client_do_low.3

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2009-08-11 10:06:22 UTC
  • mto: (1.2.3 upstream) (6.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20090811100622-6ig4iknanc73olum
ImportĀ upstreamĀ versionĀ 0.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "GEARMAN_CLIENT_DO_LOW" "3" "December 15, 2011" "0.26" "Gearmand"
2
 
.SH NAME
3
 
gearman_client_do_low \- Gearmand Documentation, http://gearman.info/
4
 
.
5
 
.nr rst2man-indent-level 0
6
 
.
7
 
.de1 rstReportMargin
8
 
\\$1 \\n[an-margin]
9
 
level \\n[rst2man-indent-level]
10
 
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11
 
-
12
 
\\n[rst2man-indent0]
13
 
\\n[rst2man-indent1]
14
 
\\n[rst2man-indent2]
15
 
..
16
 
.de1 INDENT
17
 
.\" .rstReportMargin pre:
18
 
. RS \\$1
19
 
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20
 
. nr rst2man-indent-level +1
21
 
.\" .rstReportMargin post:
22
 
..
23
 
.de UNINDENT
24
 
. RE
25
 
.\" indent \\n[an-margin]
26
 
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27
 
.nr rst2man-indent-level -1
28
 
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29
 
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30
 
..
31
 
.\" Man page generated from reStructeredText.
32
 
.
33
 
.SH SYNOPSIS
34
 
.sp
35
 
#include <libgearman/gearman.h>
36
 
.INDENT 0.0
37
 
.TP
38
 
.B void *gearman_client_do(gearman_client_st\fI\ *client\fP, const char\fI\ *function_name\fP, const char\fI\ *unique\fP, const void\fI\ *workload\fP, size_t\fI\ workload_size\fP, size_t\fI\ *result_size\fP, gearman_return_t *ret_ptr)\fI\ *client\fP)
39
 
.UNINDENT
40
 
.sp
41
 
Changed in version 0.21: \fBGEARMAN_PAUSE\fP will no longer be returned. A do operation will now run till completion or error.
42
 
.INDENT 0.0
43
 
.TP
44
 
.B void *gearman_client_do_high(gearman_client_st\fI\ *client\fP, const char\fI\ *function_name\fP, const char\fI\ *unique\fP, const void\fI\ *workload\fP, size_t\fI\ workload_size\fP, size_t\fI\ *result_size\fP, gearman_return_t\fI\ *ret_ptr\fP)
45
 
.UNINDENT
46
 
.INDENT 0.0
47
 
.TP
48
 
.B void *gearman_client_do_low(gearman_client_st\fI\ *client\fP, const char\fI\ *function_name\fP, const char\fI\ *unique\fP, const void\fI\ *workload\fP, size_t\fI\ workload_size\fP, size_t\fI\ *result_size\fP, gearman_return_t\fI\ *ret_ptr\fP)
49
 
.UNINDENT
50
 
.SH DESCRIPTION
51
 
.sp
52
 
\fI\%gearman_client_do()\fP executes a single request to the gearmand
53
 
server and waits for a reply.
54
 
.sp
55
 
\fI\%gearman_client_do_high()\fP and \fI\%gearman_client_do_low()\fP are
56
 
identical to \fI\%gearman_client_do()\fP, only they set the priority to
57
 
either high or low.
58
 
.sp
59
 
All of the functions will block until either a response or an error is
60
 
returned.
61
 
.SH RETURN VALUE
62
 
.sp
63
 
\fI\%gearman_client_do()\fP returns a pointer to a value that the caller must release. If ret_ptr is provided any errors that have occurred will be stored in it. Since a NULL/zero value is a valid value, you will always need to check ret_ptr if you are concerned with errors.
64
 
.SH EXAMPLE
65
 
.sp
66
 
.nf
67
 
.ft C
68
 
#include <string.h>
69
 
#include <stdlib.h>
70
 
#include <libgearman/gearman.h>
71
 
 
72
 
int main(void)
73
 
{
74
 
  gearman_client_st *client= gearman_client_create(NULL);
75
 
 
76
 
  gearman_return_t ret= gearman_client_add_server(client, "localhost", 0);
77
 
  if (gearman_failed(ret))
78
 
  {
79
 
    return EXIT_FAILURE;
80
 
  }
81
 
 
82
 
  size_t result_size;
83
 
  gearman_return_t rc;
84
 
  void *value= gearman_client_do(client, "reverse_function", "unique_value", 
85
 
                                 "my string to reverse", strlen("my string to reverse"), 
86
 
                                 &result_size, &rc);
87
 
 
88
 
  if (gearman_success(rc))
89
 
  {
90
 
    // Make use of value
91
 
  }
92
 
  free(value);
93
 
 
94
 
  gearman_client_free(client);
95
 
 
96
 
  return 0;
97
 
}
98
 
 
99
 
.ft P
100
 
.fi
101
 
.SH HOME
102
 
.sp
103
 
To find out more information please check:
104
 
\fI\%http://gearman.info/\fP
105
 
.IP "See also"
106
 
.sp
107
 
\fIgearmand(8)\fP \fIlibgearman(3)\fP \fIgearman_strerror(3)\fP
108
 
.RE
109
 
.SH AUTHOR
110
 
Data Differential http://datadifferential.com/
111
 
.SH COPYRIGHT
112
 
2011, Data Differential, http://datadifferential.com/
113
 
.\" Generated by docutils manpage writer.
114
 
.\" 
115
 
.