ZMQ_CTX_GET_EXT(3)
π ZMQ_CTX_GET_EXT(3) β straight from the 0MQ Manual π
Okay bestie, welcome to the page for zmq_ctx_get_ext, fresh out of the 0MQ Manual and ready to spill the extended-context-options tea ββ¨
β¨ NAME β¨
zmq_ctx_get_ext β get extended context options
πΈ SYNOPSIS πΈ
int zmq_ctx_get_ext (void *context, int option_name, void *option_value,
size_t *option_len);
π¦ DESCRIPTION π¦
So the manual literally says zmq_ctx_get() in this sentence β keeping it exactly as written, no edits: the zmq_ctx_get() function shall retrieve the value for the option specified by the option_name argument and store it in the buffer pointed to by the option_value argument. The option_len argument is the size in bytes of the buffer pointed to by option_value; upon successful completion zmq_ctx_get_ext() shall modify the option_len argument to indicate the actual size of the option value stored in the buffer. Slay, that's the whole data-flow situation π
The zmq_ctx_get_ext() function accepts all the option names accepted by zmq_ctx_get(). Options that make most sense to retrieve using zmq_ctx_get_ext() instead of zmq_ctx_get() are:
π ZMQ_THREAD_NAME_PREFIX: Get name prefix for I/O threads π
The ZMQ_THREAD_NAME_PREFIX argument gets the string prefix of each thread created for the internal contextβs thread pool.
- Option value type β character string
- Option value unit β
N/A - Default value β empty string
π RETURN VALUE π
The zmq_ctx_get_ext() function returns a value of 0 or greater if successful. Otherwise it returns -1 and sets errno to one of the values defined below. Periodt.
π ERRORS π
EINVALβ the requested optionoption_nameis unknown.EFAULTβ the providedcontextis invalid.
π EXAMPLE π
Setting a prefix on internal ZMQ thread names:.
void *context = zmq_ctx_new ();
const char prefix[] = "MyApp";
size_t prefixLen = sizeof(prefix);
zmq_ctx_set (context, ZMQ_THREAD_NAME_PREFIX, &prefix, &prefixLen);
char buff[256];
size_t buffLen = sizeof(buff);
int rc = zmq_ctx_get (context, ZMQ_THREAD_NAME_PREFIX, &buff, &buffLen);
assert (rc == 0);
assert (buffLen == prefixLen);
π SEE ALSO π
π«Ά AUTHORS π«Ά
This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at http://www.zeromq.org/docs:contributing.
That's the whole vibe, bestie. This page is from 0MQ 4.3.5, dated 02/15/2026. Go get those extended context options β no cap, you've got this πβ¨
π¦ where this page comes from
- arch rolling: zeromq 4.3.5-3 Β· MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms