1ZPROC(3)                          CZMQ Manual                         ZPROC(3)
2
3
4

NAME

6       zproc - process configuration and status
7

SYNOPSIS

9       //  This is a draft class, and may change without notice. It is disabled in
10       //  stable builds by default. If you use this in applications, please ask
11       //  for it to be pushed to stable state. Use --enable-drafts to enable.
12       #ifdef CZMQ_BUILD_DRAFT_API
13       //  *** Draft method, for development use, may change without warning ***
14       //  Returns CZMQ version as a single 6-digit integer encoding the major
15       //  version (x 10000), the minor version (x 100) and the patch.
16       CZMQ_EXPORT int
17           zproc_czmq_version (void);
18
19       //  *** Draft method, for development use, may change without warning ***
20       //  Returns true if the process received a SIGINT or SIGTERM signal.
21       //  It is good practice to use this method to exit any infinite loop
22       //  processing messages.
23       CZMQ_EXPORT bool
24           zproc_interrupted (void);
25
26       //  *** Draft method, for development use, may change without warning ***
27       //  Returns true if the underlying libzmq supports CURVE security.
28       CZMQ_EXPORT bool
29           zproc_has_curve (void);
30
31       //  *** Draft method, for development use, may change without warning ***
32       //  Return current host name, for use in public tcp:// endpoints.
33       //  If the host name is not resolvable, returns NULL.
34       //  Caller owns return value and must destroy it when done.
35       CZMQ_EXPORT char *
36           zproc_hostname (void);
37
38       //  *** Draft method, for development use, may change without warning ***
39       //  Move the current process into the background. The precise effect
40       //  depends on the operating system. On POSIX boxes, moves to a specified
41       //  working directory (if specified), closes all file handles, reopens
42       //  stdin, stdout, and stderr to the null device, and sets the process to
43       //  ignore SIGHUP. On Windows, does nothing. Returns 0 if OK, -1 if there
44       //  was an error.
45       CZMQ_EXPORT void
46           zproc_daemonize (const char *workdir);
47
48       //  *** Draft method, for development use, may change without warning ***
49       //  Drop the process ID into the lockfile, with exclusive lock, and
50       //  switch the process to the specified group and/or user. Any of the
51       //  arguments may be null, indicating a no-op. Returns 0 on success,
52       //  -1 on failure. Note if you combine this with zsys_daemonize, run
53       //  after, not before that method, or the lockfile will hold the wrong
54       //  process ID.
55       CZMQ_EXPORT void
56           zproc_run_as (const char *lockfile, const char *group, const char *user);
57
58       //  *** Draft method, for development use, may change without warning ***
59       //  Configure the number of I/O threads that ZeroMQ will use. A good
60       //  rule of thumb is one thread per gigabit of traffic in or out. The
61       //  default is 1, sufficient for most applications. If the environment
62       //  variable ZSYS_IO_THREADS is defined, that provides the default.
63       //  Note that this method is valid only before any socket is created.
64       CZMQ_EXPORT void
65           zproc_set_io_threads (size_t io_threads);
66
67       //  *** Draft method, for development use, may change without warning ***
68       //  Configure the number of sockets that ZeroMQ will allow. The default
69       //  is 1024. The actual limit depends on the system, and you can query it
70       //  by using zsys_socket_limit (). A value of zero means "maximum".
71       //  Note that this method is valid only before any socket is created.
72       CZMQ_EXPORT void
73           zproc_set_max_sockets (size_t max_sockets);
74
75       //  *** Draft method, for development use, may change without warning ***
76       //  Set network interface name to use for broadcasts, particularly zbeacon.
77       //  This lets the interface be configured for test environments where required.
78       //  For example, on Mac OS X, zbeacon cannot bind to 255.255.255.255 which is
79       //  the default when there is no specified interface. If the environment
80       //  variable ZSYS_INTERFACE is set, use that as the default interface name.
81       //  Setting the interface to "*" means "use all available interfaces".
82       CZMQ_EXPORT void
83           zproc_set_biface (const char *value);
84
85       //  *** Draft method, for development use, may change without warning ***
86       //  Return network interface to use for broadcasts, or "" if none was set.
87       CZMQ_EXPORT const char *
88           zproc_biface (void);
89
90       //  *** Draft method, for development use, may change without warning ***
91       //  Set log identity, which is a string that prefixes all log messages sent
92       //  by this process. The log identity defaults to the environment variable
93       //  ZSYS_LOGIDENT, if that is set.
94       CZMQ_EXPORT void
95           zproc_set_log_ident (const char *value);
96
97       //  *** Draft method, for development use, may change without warning ***
98       //  Sends log output to a PUB socket bound to the specified endpoint. To
99       //  collect such log output, create a SUB socket, subscribe to the traffic
100       //  you care about, and connect to the endpoint. Log traffic is sent as a
101       //  single string frame, in the same format as when sent to stdout. The
102       //  log system supports a single sender; multiple calls to this method will
103       //  bind the same sender to multiple endpoints. To disable the sender, call
104       //  this method with a null argument.
105       CZMQ_EXPORT void
106           zproc_set_log_sender (const char *endpoint);
107
108       //  *** Draft method, for development use, may change without warning ***
109       //  Enable or disable logging to the system facility (syslog on POSIX boxes,
110       //  event log on Windows). By default this is disabled.
111       CZMQ_EXPORT void
112           zproc_set_log_system (bool logsystem);
113
114       //  *** Draft method, for development use, may change without warning ***
115       //  Log error condition - highest priority
116       CZMQ_EXPORT void
117           zproc_log_error (const char *format, ...) CHECK_PRINTF (1);
118
119       //  *** Draft method, for development use, may change without warning ***
120       //  Log warning condition - high priority
121       CZMQ_EXPORT void
122           zproc_log_warning (const char *format, ...) CHECK_PRINTF (1);
123
124       //  *** Draft method, for development use, may change without warning ***
125       //  Log normal, but significant, condition - normal priority
126       CZMQ_EXPORT void
127           zproc_log_notice (const char *format, ...) CHECK_PRINTF (1);
128
129       //  *** Draft method, for development use, may change without warning ***
130       //  Log informational message - low priority
131       CZMQ_EXPORT void
132           zproc_log_info (const char *format, ...) CHECK_PRINTF (1);
133
134       //  *** Draft method, for development use, may change without warning ***
135       //  Log debug-level message - lowest priority
136       CZMQ_EXPORT void
137           zproc_log_debug (const char *format, ...) CHECK_PRINTF (1);
138
139       //  *** Draft method, for development use, may change without warning ***
140       //  Self test of this class.
141       CZMQ_EXPORT void
142           zproc_test (bool verbose);
143
144       #endif // CZMQ_BUILD_DRAFT_API
145       Please add '@interface' section in './../src/zproc.c'.
146

DESCRIPTION

148       zproc - process configuration and status
149
150       Please add @discuss section in ./../src/zproc.c.
151

EXAMPLE

153       From zproc_test method.
154
155           Please add '@selftest' section in './../src/zproc.c'.
156
157

AUTHORS

159       The czmq manual was written by the authors in the AUTHORS file.
160

RESOURCES

162       Main web site:
163
164       Report bugs to the email <zeromq-dev@lists.zeromq.org[1]>
165
167       Copyright (c) the Contributors as noted in the AUTHORS file. This file
168       is part of CZMQ, the high-level C binding for 0MQ:
169       http://czmq.zeromq.org. This Source Code Form is subject to the terms
170       of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
171       distributed with this file, You can obtain one at
172       http://mozilla.org/MPL/2.0/. LICENSE included with the czmq
173       distribution.
174

NOTES

176        1. zeromq-dev@lists.zeromq.org
177           mailto:zeromq-dev@lists.zeromq.org
178
179
180
181CZMQ 4.0.2                        12/31/2016                          ZPROC(3)
Impressum